diff options
author | Jon Gjengset | 2019-03-04 22:10:14 -0500 |
---|---|---|
committer | Jon Gjengset | 2019-03-04 22:10:14 -0500 |
commit | 75f0f204826175e151fef8dfeab6bfc9037d15a2 (patch) | |
tree | 6dc778c9b5cf0ce64381455f3ef5d9ba68af0cd0 | |
download | aur-75f0f204826175e151fef8dfeab6bfc9037d15a2.tar.gz |
Initial package for milton-git
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 75 | ||||
-rw-r--r-- | carlito-sys.patch | 13 | ||||
-rw-r--r-- | milton.desktop | 12 | ||||
-rw-r--r-- | no-main.patch | 14 |
6 files changed, 144 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c3d1ff1a3283 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = milton-git + pkgdesc = An infinite-canvas paint program + pkgver = 1.5.0.r145.4dbc26e + pkgrel = 1 + url = https://github.com/serge-rgb/milton + arch = x86_64 + license = GPL + makedepends = git + makedepends = sdl2 + makedepends = icoutils + depends = opengl-driver + depends = gtk2 + depends = libxi + depends = ttf-carlito + provides = milton + conflicts = milton + source = git+https://github.com/serge-rgb/milton.git + source = no-main.patch + source = carlito-sys.patch + source = milton.desktop + sha256sums = SKIP + sha256sums = 9f97e9a168888d2d5e63e2d04e20c3e1c602ff95a975ccbf6d83537507375b6b + sha256sums = 04c4c462cf4ffb712f5df7a5a21013e343fbedd701a4948eaeb4e17915d14b3d + sha256sums = 59e5dec9b6ec0cfadc45e56728d83e66e612c84cfa67f15451df38ec0bad55d0 + +pkgname = milton-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c46696b6bab7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/*.pkg.tar.xz +/src +/pkg diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f9a1be6058f0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: Jon Gjengset <jon@thesquareplanet.com> +pkgname=milton-git +pkgver=1.5.0.r145.4dbc26e +pkgrel=1 +pkgdesc="An infinite-canvas paint program" +arch=(x86_64) +url="https://github.com/serge-rgb/milton" +license=('GPL') +groups=() +depends=('opengl-driver' 'gtk2' 'libxi' 'ttf-carlito') +makedepends=('git' 'sdl2' 'icoutils') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +replaces=() +backup=() +options=() +install= +source=('git+https://github.com/serge-rgb/milton.git' + 'no-main.patch' 'carlito-sys.patch' 'milton.desktop') +noextract=() +sha256sums=('SKIP' + '9f97e9a168888d2d5e63e2d04e20c3e1c602ff95a975ccbf6d83537507375b6b' + '04c4c462cf4ffb712f5df7a5a21013e343fbedd701a4948eaeb4e17915d14b3d' + '59e5dec9b6ec0cfadc45e56728d83e66e612c84cfa67f15451df38ec0bad55d0') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "%s" "$(git describe --long | tr -d v | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" +} + +prepare() { + cd "$srcdir/${pkgname%-git}" + patch -Np1 -i "${srcdir}/no-main.patch" + patch -Np1 -i "${srcdir}/carlito-sys.patch" +} + +build() { + cd "$srcdir/${pkgname%-git}" + + # see build-lin.sh in the git repo + pushd third_party/SDL2-2.0.8 + mkdir -p build/linrelease + pushd build/linrelease > /dev/null + cmake \ + -D ARTS:BOOL=OFF \ + -D ALSA:BOOL=OFF \ + -D PULSEAUDIO:BOOL=OFF \ + -D OSS:BOOL=OFF \ + -D ESD:BOOL=OFF \ + -D SDL_SHARED:BOOL=OFF \ + -D CMAKE_INSTALL_PREFIX="../linux64" \ + -G "Unix Makefiles" \ + -D CMAKE_DEBUG_POSTFIX="_debug" \ + -D SDL_STATIC_PIC:BOOL=ON \ + -D CMAKE_BUILD_TYPE="Debug" ../.. + make install + popd > /dev/null + popd + + mkdir -p build + cd build + cmake .. + make +} + +package() { + cd "$srcdir/${pkgname%-git}" + cd build + install -Dm755 Milton "${pkgdir}/usr/bin/milton" + icotool -x milton_icon.ico + for res in 16x16 32x32 48x48 64x64 128x128 256x256; do + install -Dm644 milton_icon_*"_${res}x32.png" "${pkgdir}/usr/share/icons/hicolor/${res}/apps/milton.png" + done + install -Dm644 "${srcdir}/milton.desktop" "${pkgdir}/usr/share/applications/milton.desktop" +} diff --git a/carlito-sys.patch b/carlito-sys.patch new file mode 100644 index 000000000000..a34a7d378bcf --- /dev/null +++ b/carlito-sys.patch @@ -0,0 +1,13 @@ +diff --git a/src/sdl_milton.cc b/src/sdl_milton.cc +index 2384abf..84921c1 100644 +--- a/src/sdl_milton.cc ++++ b/src/sdl_milton.cc +@@ -794,7 +794,7 @@ milton_main(bool is_fullscreen, char* file_to_open) + milton_log("ImGUI setup\n"); + ImGuiIO& io = ImGui::GetIO(); + io.IniFilename = NULL; // Don't save any imgui.ini file +- PATH_CHAR fname[MAX_PATH] = TO_PATH_STR("Carlito.ttf"); ++ PATH_CHAR fname[MAX_PATH] = TO_PATH_STR("/usr/share/fonts/TTF/Carlito-Regular.ttf"); + platform_fname_at_exe(fname, MAX_PATH); + FILE* fd = platform_fopen(fname, TO_PATH_STR("rb")); + diff --git a/milton.desktop b/milton.desktop new file mode 100644 index 000000000000..8316d3a89ca8 --- /dev/null +++ b/milton.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Name=Milton +TryExec=milton +Exec=milton %f +Comment=An infinite-canvas paint program +GenericName=Canvas Painting Program +Type=Application +Icon=milton +#StartupNotify=true +Categories=Graphics;GTK;2DGraphics;VectorGraphics;Art; +Terminal=false diff --git a/no-main.patch b/no-main.patch new file mode 100644 index 000000000000..f8b31f90c329 --- /dev/null +++ b/no-main.patch @@ -0,0 +1,14 @@ +diff --git a/src/unity.cc b/src/unity.cc +index c244f9c..5e5201e 100644 +--- a/src/unity.cc ++++ b/src/unity.cc +@@ -28,9 +28,6 @@ + #if !defined(TESTING) + #if defined(_WIN32) + #include "platform_main_windows.cc" +- #elif defined(__linux__) +- #include "platform_main_unix.cc" +- #include "platform_main_linux.cc" + #elif defined(__MACH__) + // #include "platform_main_unix.cc" + #endif |