summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-19 07:35:20 +0100
committerSam James <sam@gentoo.org>2021-04-19 20:09:53 +0100
commit88a5d1099cebec9be1c26cbc2e71fa23b6d99c92 (patch)
tree6479b9ee6d55277b91382a206ad08f3e10d57a93 /games-puzzle/picpuz
parentgames-emulation/fbzx: respect ${PKG_CONFIG} (diff)
downloadgentoo-88a5d1099cebec9be1c26cbc2e71fa23b6d99c92.tar.gz
gentoo-88a5d1099cebec9be1c26cbc2e71fa23b6d99c92.tar.bz2
gentoo-88a5d1099cebec9be1c26cbc2e71fa23b6d99c92.zip
games-puzzle/picpuz: respect ${PKG_CONFIG}, CXX
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-puzzle/picpuz')
-rw-r--r--games-puzzle/picpuz/files/picpuz-2.5-build.patch10
-rw-r--r--games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch6
-rw-r--r--games-puzzle/picpuz/picpuz-2.5-r1.ebuild12
3 files changed, 16 insertions, 12 deletions
diff --git a/games-puzzle/picpuz/files/picpuz-2.5-build.patch b/games-puzzle/picpuz/files/picpuz-2.5-build.patch
index dfec57fe6ec0..6ca26e178bbf 100644
--- a/games-puzzle/picpuz/files/picpuz-2.5-build.patch
+++ b/games-puzzle/picpuz/files/picpuz-2.5-build.patch
@@ -1,8 +1,8 @@
From: Julian Ospald <hasufell@gentoo.org>
Date: Sat Jul 21 17:03:11 UTC 2012
---- picpuz-2.5/Makefile
-+++ picpuz-2.5/Makefile
+--- a/Makefile
++++ b/Makefile
@@ -11,24 +11,26 @@
# target install directories
@@ -18,7 +18,7 @@ Date: Sat Jul 21 17:03:11 UTC 2012
MENUFILE = $(PREFIX)/share/applications/kornelix-$(PROGRAM).desktop
-CFLAGS = $(CXXFLAGS) -c `pkg-config --cflags gtk+-3.0`
-+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
@@ -46,8 +46,8 @@ Date: Sat Jul 21 17:03:11 UTC 2012
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
+--- a/zfuncs.cc
++++ b/zfuncs.cc
@@ -3111,7 +3111,6 @@
/prefix/share/appname/locales/ translations: appname-de.po etc.
/home/user/.appname/ parameters etc. are copied here
diff --git a/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch b/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch
index 652231f1d4ff..f11f95cbf72b 100644
--- a/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch
+++ b/games-puzzle/picpuz/files/picpuz-2.5-pthread-underlinking.patch
@@ -3,16 +3,14 @@ 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`
+ CXXFLAGS += -c `${PKG_CONFIG} --cflags gtk+-3.0`
-LIBS = `pkg-config --libs gtk+-3.0`
-+LIBS = -pthread `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/picpuz-2.5-r1.ebuild b/games-puzzle/picpuz/picpuz-2.5-r1.ebuild
index 5da7fe0df616..2b1863eb8bbe 100644
--- a/games-puzzle/picpuz/picpuz-2.5-r1.ebuild
+++ b/games-puzzle/picpuz/picpuz-2.5-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit desktop gnome2-utils
+
+inherit desktop gnome2-utils toolchain-funcs
DESCRIPTION="A jigsaw puzzle program"
HOMEPAGE="http://kornelix.squarespace.com/picpuz/"
@@ -11,7 +12,6 @@ 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}
@@ -24,6 +24,8 @@ PATCHES=(
)
src_compile() {
+ tc-export CXX PKG_CONFIG
+
emake \
BINDIR="/usr/bin" \
DATADIR=/usr/share/${PN} \
@@ -32,11 +34,15 @@ src_compile() {
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
}