summaryrefslogtreecommitdiff
path: root/games-puzzle/picpuz
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle/picpuz')
-rw-r--r--games-puzzle/picpuz/Manifest5
-rw-r--r--games-puzzle/picpuz/files/picpuz-2.5-build.patch116
-rw-r--r--games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch18
-rw-r--r--games-puzzle/picpuz/metadata.xml8
-rw-r--r--games-puzzle/picpuz/picpuz-2.5-r1.ebuild54
5 files changed, 201 insertions, 0 deletions
diff --git a/games-puzzle/picpuz/Manifest b/games-puzzle/picpuz/Manifest
new file mode 100644
index 000000000000..5d66c15f6100
--- /dev/null
+++ b/games-puzzle/picpuz/Manifest
@@ -0,0 +1,5 @@
+AUX picpuz-2.5-build.patch 5499 BLAKE2B cb568f817502eef15695e5f1cdaad837127e6004616b63596125b3538421c51e11edafc9421b173809cc22fb166d636eb47467d23ad12b5a7446a21638e5d9ea SHA512 49486aa996419da06fa7a14ac61c89930c1ca79f97615253bc1c4a96c7bc0af405d52661e1dd4b5186cf00877cde5b698070bbb9229d50e27a1a981de03d2f11
+AUX picpuz-2.5-pthread-underlinking.patch 842 BLAKE2B c347703e5b8d069872c34b7af776ea5e5e27967683db9fa7834c876482e22dd41e36d3c16b7da31235bd0e5f5228dccf1e279be80969757a69acc8bc1b215532 SHA512 12c5d7e46d9db2312b24524c33877d9fcf2c6f94bf822d03bd24f021d91496b1759af078582311663e28c98405d274ee30179140b92e44b9ddaca4b40a05e658
+DIST picpuz-2.5.tar.gz 267452 BLAKE2B c99126cb38611ad2e7013f0108631d6d5c7a51add0927be3fe45c6225a03db655770b05cc47626d5fe80680530527dcd5acc39495be7666fe9ec6959a2e5f0ca SHA512 598507b29b1218f05ca8a0d1a5788607cd3db899cad83ce84606d268d513c75b863986d518f0ec134cac0a5879515a13cb794f87a59bf55b48217fc6b1f5c386
+EBUILD picpuz-2.5-r1.ebuild 1044 BLAKE2B eb75be02e73ea8f0c4d0faa9f062a3b8591ce1c6a388f7a92b661dd1d0274c59accc2d3c3183139554ec7e83e9538e98d18b1e7dcb0b079aa9945dd53ac0b654 SHA512 32bd76f61cd94c14bdb3f6c831896249f4b657522eff6d8a7cc7e42c05bc28584bd772d080f50c5555293dcd448068b17eef3f59d130393873a29ce9c5e1cf17
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-puzzle/picpuz/files/picpuz-2.5-build.patch b/games-puzzle/picpuz/files/picpuz-2.5-build.patch
new file mode 100644
index 000000000000..dfec57fe6ec0
--- /dev/null
+++ b/games-puzzle/picpuz/files/picpuz-2.5-build.patch
@@ -0,0 +1,116 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Jul 21 17:03:11 UTC 2012
+
+--- picpuz-2.5/Makefile
++++ picpuz-2.5/Makefile
+@@ -11,24 +11,26 @@
+
+ # target install directories
+ BINDIR = $(PREFIX)/bin
+-SHAREDIR = $(PREFIX)/share/$(PROGRAM)
+-ICONDIR = $(SHAREDIR)/icons
+-LOCALESDIR = $(SHAREDIR)/locales
++DATADIR = $(PREFIX)/share/$(PROGRAM)
++ICONDIR = $(DATADIR)/icons
++LOCALESDIR = $(DATADIR)/locales
+ DOCDIR = $(PREFIX)/share/doc/$(PROGRAM)
+ MANDIR = $(PREFIX)/share/man/man1
+ MENUFILE = $(PREFIX)/share/applications/kornelix-$(PROGRAM).desktop
+
+-CFLAGS = $(CXXFLAGS) -c `pkg-config --cflags gtk+-3.0`
++CXXFLAGS += -c `pkg-config --cflags gtk+-3.0`
+ LIBS = `pkg-config --libs gtk+-3.0`
+
+ $(PROGRAM): $(PROGRAM).o zfuncs.o
+- $(CXX) $(LDFLAGS) $(PROGRAM).o zfuncs.o $(LIBS) -o $(PROGRAM)
++ $(CXX) $(LDFLAGS) $(PROGRAM).o zfuncs.o $(LIBS) -o $(PROGRAM)
+
+ $(PROGRAM).o: $(SOURCE)
+- $(CXX) $(CFLAGS) -o $(PROGRAM).o $(SOURCE)
++ $(CXX) $(CXXFLAGS) -o $(PROGRAM).o $(SOURCE) \
++ -D "DATADIR=\"$(DATADIR)\"" -D "DOCDIR=\"$(DOCDIR)\""
+
+ zfuncs.o: zfuncs.cc
+- $(CXX) $(CFLAGS) zfuncs.cc -D PREFIX=\"$(PREFIX)\"
++ $(CXX) $(CXXFLAGS) zfuncs.cc \
++ -D "DATADIR=\"$(DATADIR)\"" -D "DOCDIR=\"$(DOCDIR)\"" -D "BINDIR=\"$(BINDIR)\""
+
+ install: $(PROGRAM)
+ mkdir -p $(DESTDIR)$(BINDIR)
+@@ -52,7 +54,7 @@
+
+ uninstall:
+ rm -f $(DESTDIR)$(BINDIR)/$(PROGRAM)
+- rm -R -f $(DESTDIR)$(SHAREDIR)
++ rm -R -f $(DESTDIR)$(DATADIR)
+ rm -R -f $(DESTDIR)$(DOCDIR)
+ rm -f $(DESTDIR)$(MANDIR)/$(PROGRAM).1.gz
+ xdg-desktop-menu uninstall $(DESTDIR)$(MENUFILE)
+--- picpuz-2.5/zfuncs.cc
++++ picpuz-2.5/zfuncs.cc
+@@ -3111,7 +3111,6 @@
+ /prefix/share/appname/locales/ translations: appname-de.po etc.
+ /home/user/.appname/ parameters etc. are copied here
+
+- zprefix install location has /bin and /share subtrees
+ zdatadir installed data files .desktop, parameters, etc.
+ zdocdir user documentation README, changelog, user guide
+ zicondir icons icon files .png
+@@ -3123,7 +3122,7 @@
+ namespace zfuncs
+ {
+ char zappname[20];
+- char zprefix[200], zdatadir[200], zdocdir[200]; // app directories
++ char zdatadir[200], zdocdir[200]; // app directories
+ char zicondir[200], zlocalesdir[200], zuserdir[200];
+ char zlang[8] = "en"; // "lc" or "lc_RC"
+ char JPGquality[4] = "85"; // JPG file save quality
+@@ -3132,7 +3131,6 @@
+ pthread_t tid_main = 0; // main thread ID v.4.8
+ }
+
+-cchar * get_zprefix() { return zfuncs::zprefix; } // /usr or /home/<userid>
+ cchar * get_zuserdir() { return zfuncs::zuserdir; } // /home/user/.appname
+ cchar * get_zdatadir() { return zfuncs::zdatadir; } // parameters, icons
+ cchar * get_zdocdir() { return zfuncs::zdocdir; } // documentation files
+@@ -3156,19 +3154,15 @@
+
+ catch_signals(); // catch segfault, do backtrace
+
+- strcpy(zappname,appname); // save app name
+-
+- #ifndef PREFIX // install location v.4.7
+- #define PREFIX "/usr"
+- #endif
+-
+- strncpy0(work,PREFIX,199); // /usr or /home/<userid> v.4.6
+- strcpy(zprefix,work); // /prefix
+- strncatv(zdatadir,199,work,"/share/",zappname,"/data",null); // /prefix/share/appname/data
+- strncatv(zicondir,199,work,"/share/",zappname,"/icons",null); // /prefix/share/appname/icons
+- strncatv(zlocalesdir,199,work,"/share/",zappname,"/locales",null); // /prefix/share/appname/locales
+- strncatv(zdocdir,199,work,"/share/doc/",zappname,null); // /prefix/share/doc/appname
+-
++ strcpy(zappname,appname);
++
++ strcpy(zdatadir,DATADIR); // macros from build script
++ strcpy(zdocdir,DOCDIR);
++ strcpy(zicondir,zdatadir);
++ strcat(zicondir,"/icons");
++ strcpy(zlocalesdir,zdatadir);
++ strcat(zlocalesdir,"/locales");
++
+ snprintf(zuserdir,199,"%s/.%s",getenv("HOME"),zappname); // /home/user/.appname/ v.4.3
+ err = stat(zuserdir,&statdat); // does it exist already?
+ if (err) {
+@@ -3366,9 +3360,9 @@
+ fputs(work,fid);
+ fputs("Type=Application\n",fid); // Type=Application
+ fputs("Terminal=false\n",fid); // Terminal=false
+- snprintf(work,199,"Exec=%s/bin/%s\n",zprefix,command); // Exec=/usr/bin/appname -options
++ snprintf(work,199,"Exec=%s/%s\n",BINDIR,zappname); // Exec=/usr/bin/appname -options
+ fputs(work,fid);
+- snprintf(work,199,"Icon=%s/%s.png\n",zicondir,appname); // Icon=/usr/share/appname/icons/appname.png
++ snprintf(work,199,"Icon=%s/icons/%s.png\n",DATADIR,zappname); // Icon=/usr/share/appname/icons/appname.png
+ fputs(work,fid);
+ fclose(fid);
+
diff --git a/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch b/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch
new file mode 100644
index 000000000000..652231f1d4ff
--- /dev/null
+++ b/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch
@@ -0,0 +1,18 @@
+Fix underlinking on recent binutils:
+
+> x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu picpuz.o zfuncs.o `pkg-config --libs gtk+-3.0` -o picpuz
+> /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: zfuncs.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
+> /lib64/libpthread.so.0: error adding symbols: DSO missing from command line
+diff --git a/Makefile b/Makefile
+index 28638de..700b610 100644
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,7 @@ MANDIR = $(PREFIX)/share/man/man1
+ MENUFILE = $(PREFIX)/share/applications/kornelix-$(PROGRAM).desktop
+
+ CXXFLAGS += -c `pkg-config --cflags gtk+-3.0`
+-LIBS = `pkg-config --libs gtk+-3.0`
++LIBS = -pthread `pkg-config --libs gtk+-3.0`
+
+ $(PROGRAM): $(PROGRAM).o zfuncs.o
+ $(CXX) $(LDFLAGS) $(PROGRAM).o zfuncs.o $(LIBS) -o $(PROGRAM)
diff --git a/games-puzzle/picpuz/metadata.xml b/games-puzzle/picpuz/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-puzzle/picpuz/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-puzzle/picpuz/picpuz-2.5-r1.ebuild b/games-puzzle/picpuz/picpuz-2.5-r1.ebuild
new file mode 100644
index 000000000000..5da7fe0df616
--- /dev/null
+++ b/games-puzzle/picpuz/picpuz-2.5-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop gnome2-utils
+
+DESCRIPTION="A jigsaw puzzle program"
+HOMEPAGE="http://kornelix.squarespace.com/picpuz/"
+SRC_URI="http://kornelix.squarespace.com/storage/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-pthread-underlinking.patch
+)
+
+src_compile() {
+ emake \
+ BINDIR="/usr/bin" \
+ DATADIR=/usr/share/${PN} \
+ DOCDIR=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /usr/share/${PN}
+ doins -r icons locales
+ doicon -s 48 icons/${PN}.png
+ make_desktop_entry ${PN} Picpuz
+ HTML_DOCS="doc/userguide-en.html doc/images" einstalldocs
+ dodoc doc/{changelog,README,translations}
+ newman doc/${PN}.man ${PN}.1
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}