summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-12-01 12:01:37 +0000
committerSam James <sam@gentoo.org>2020-12-01 12:03:07 +0000
commitd787436065e7c11fd52451f2b33774b7a8366457 (patch)
tree61c280f045970fe8b433d19012069bbc8f67fad4
parentnet-p2p/qbittorrent: Version bump (v4.3.1) (diff)
downloadgentoo-d787436065e7c11fd52451f2b33774b7a8366457.tar.gz
gentoo-d787436065e7c11fd52451f2b33774b7a8366457.tar.bz2
gentoo-d787436065e7c11fd52451f2b33774b7a8366457.zip
dev-db/qdbm: fix Darwin build
Package-Manager: Portage-3.0.10.2-prefix, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-db/qdbm/files/qdbm-1.8.78-darwin.patch28
-rw-r--r--dev-db/qdbm/qdbm-1.8.78-r2.ebuild42
2 files changed, 56 insertions, 14 deletions
diff --git a/dev-db/qdbm/files/qdbm-1.8.78-darwin.patch b/dev-db/qdbm/files/qdbm-1.8.78-darwin.patch
new file mode 100644
index 000000000000..de2d33c4ea15
--- /dev/null
+++ b/dev-db/qdbm/files/qdbm-1.8.78-darwin.patch
@@ -0,0 +1,28 @@
+diff --git a/Makefile.in b/Makefile.in
+index 2fec03a..2a1c3a3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,18 +52,18 @@ DESTDIR =
+ # Building binaries
+ CC = @CC@
+ CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(MYHEADDIR) \
+- -I$(HOME)/include -I/usr/local/include @MYDEFS@ \
++ -I$(HOME)/include @MYDEFS@ \
+ -D_XOPEN_SOURCE_EXTENDED=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__=1 -D_HPUX_SOURCE=1 \
+ -D_POSIX_MAPPED_FILES=1 -D_POSIX_SYNCHRONIZED_IO=1 \
+ -DPIC=1 -D_THREAD_SAFE=1 -D_REENTRANT=1 -DNDEBUG
+-CFLAGS = -Wall -pedantic -fPIC -fsigned-char -O3 -fomit-frame-pointer -fforce-addr @MYOPTS@
++CFLAGS = -Wall -pedantic -fPIC -fsigned-char -fforce-addr @MYOPTS@
+ LD = @LD@
+ LIBS = -lqdbm @LIBS@
+-LIBLDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib @LIBS@
+-LDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib $(LIBS)
++LIBLDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib @LIBS@
++LDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib $(LIBS)
+ AR = @AR@
+ ARFLAGS = rcsv
+-RUNENV = LD_LIBRARY_PATH=.:/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib
++RUNENV = LD_LIBRARY_PATH=./:$(MYLIBDIR):$(HOME)/lib
+
+
+
diff --git a/dev-db/qdbm/qdbm-1.8.78-r2.ebuild b/dev-db/qdbm/qdbm-1.8.78-r2.ebuild
index 40f5281fa882..1906d48f0204 100644
--- a/dev-db/qdbm/qdbm-1.8.78-r2.ebuild
+++ b/dev-db/qdbm/qdbm-1.8.78-r2.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-perl.patch
"${FILESDIR}"/${PN}-ruby19.patch
"${FILESDIR}"/${PN}-runpath.patch
+ "${FILESDIR}"/${PN}-1.8.78-darwin.patch
)
HTML_DOCS=( doc/. )
@@ -99,10 +100,10 @@ src_prepare() {
-e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
-e 's/make\( \|$\)/$(MAKE)\1/g' \
-e '/^debug/,/^$/s/LDFLAGS="[^"]*" //' \
- Makefile.in {cgi,java,perl,plus,ruby}/Makefile.in
- find -name "*~" -delete
+ Makefile.in {cgi,java,perl,plus,ruby}/Makefile.in || die
+ find -name "*~" -delete || die
- mv configure.{in,ac}
+ mv configure.{in,ac} || die
eautoreconf
qdbm_foreach_api
}
@@ -111,9 +112,9 @@ each_ruby_prepare() {
sed -i \
-e "s|ruby |${RUBY} |" \
-e "s|\.\./\.\.|${WORKDIR}/all/${P}|" \
- {Makefile,configure}.in {curia,depot,villa}/extconf.rb
+ {Makefile,configure}.in {curia,depot,villa}/extconf.rb || die
- mv configure.{in,ac}
+ mv configure.{in,ac} || die
eautoreconf
}
@@ -133,8 +134,12 @@ each_ruby_configure() {
}
src_compile() {
- default
- qdbm_foreach_api
+ if [[ ${CHOST} == *darwin* ]] ; then
+ emake mac
+ else
+ default
+ qdbm_foreach_api
+ fi
}
each_ruby_compile() {
@@ -142,8 +147,12 @@ each_ruby_compile() {
}
src_test() {
- default
- qdbm_foreach_api
+ if [[ ${CHOST} == *darwin* ]] ; then
+ emake check-mac
+ else
+ default
+ qdbm_foreach_api
+ fi
}
each_ruby_test() {
@@ -151,23 +160,28 @@ each_ruby_test() {
}
src_install() {
- default
+ if [[ ${CHOST} == *darwin* ]] ; then
+ emake install-mac
+ else
+ default
+ fi
+
qdbm_foreach_api
use static-libs || find "${ED}" -name '*.a' -delete || die
- rm -rf "${ED}"/usr/share/${PN}
+ rm -rf "${ED}"/usr/share/${PN} || die
if use java; then
java-pkg_dojar "${ED}"/usr/$(get_libdir)/*.jar
- rm -f "${ED}"/usr/$(get_libdir)/*.jar
+ rm -f "${ED}"/usr/$(get_libdir)/*.jar || die
fi
if use perl; then
perl_delete_module_manpages
perl_fix_packlist
fi
- rm -f "${ED}"/usr/bin/*test
- rm -f "${ED}"/usr/share/man/man1/*test.1*
+ rm -f "${ED}"/usr/bin/*test || die
+ rm -f "${ED}"/usr/share/man/man1/*test.1* || die
}
each_ruby_install() {