games-puzzle/picpuz: respect ${PKG_CONFIG}, CXX

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-04-19 07:35:20 +01:00
parent c3c36dbc59
commit 88a5d1099c
3 changed files with 16 additions and 12 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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
}