summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-07-05 22:49:46 +0200
committerDavid Seifert <soap@gentoo.org>2020-07-05 22:49:46 +0200
commit762a2940cdf51086e9df06e39c85a40386391121 (patch)
treefc49192ec31b72dcfac9be9f966d9441331d2ba5 /dev-games/hawknl
parentsys-fs/reiser4progs: Removed old (diff)
downloadgentoo-762a2940cdf51086e9df06e39c85a40386391121.tar.gz
gentoo-762a2940cdf51086e9df06e39c85a40386391121.tar.bz2
gentoo-762a2940cdf51086e9df06e39c85a40386391121.zip
dev-games/hawknl: Fix build system
Closes: https://bugs.gentoo.org/722686 Closes: https://bugs.gentoo.org/726872 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-games/hawknl')
-rw-r--r--dev-games/hawknl/files/hawknl-1.68-build.patch59
-rw-r--r--dev-games/hawknl/hawknl-1.68-r2.ebuild39
-rw-r--r--dev-games/hawknl/hawknl-1.68-r3.ebuild40
3 files changed, 82 insertions, 56 deletions
diff --git a/dev-games/hawknl/files/hawknl-1.68-build.patch b/dev-games/hawknl/files/hawknl-1.68-build.patch
index d94daaaf6d88..eb07d5cc1798 100644
--- a/dev-games/hawknl/files/hawknl-1.68-build.patch
+++ b/dev-games/hawknl/files/hawknl-1.68-build.patch
@@ -1,12 +1,39 @@
---- src/makefile.linux.orig 2005-12-16 22:03:24.000000000 -0500
-+++ src/makefile.linux 2005-12-16 22:04:18.000000000 -0500
-@@ -34,13 +34,14 @@
+--- a/src/makefile.linux
++++ b/src/makefile.linux
+@@ -1,6 +1,3 @@
+-CC = gcc
+-AR = ar cru
+-RANLIB = ranlib
+ MAJOR_VERSION = 1
+ MINOR_VERSION = 6
+ PATCH_LEVEL = 8
+@@ -11,15 +8,13 @@
+ OUTPUT = libNL.so.$(VERSION)
+ LIBNAME = NL
+ STATIC = libNL.a
+-OPTFLAGS = -funroll-all-loops -ffast-math -fomit-frame-pointer -O2 -D_GNU_SOURCE -D_REENTRANT
+-CFLAGS = -Wall -fPIC $(INCLUDE) $(OPTFLAGS)
+-LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
++CPPFLAGS += -D_GNU_SOURCE -D_REENTRANT $(INCLUDE)
++CFLAGS += -Wall -fPIC
++LIBFLAGS = -shared -Wl,-soname,libNL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
+ OBJECTS = crc.o errorstr.o nl.o sock.o group.o loopback.o err.o thread.o mutex.o condition.o nltime.o
+
+ all: $(OBJECTS)
+- $(CC) -o $(OUTPUT) $(OBJECTS) $(LIBFLAGS) $(CFLAGS)
+- $(AR) $(STATIC) $(OBJECTS)
+- $(RANLIB) $(STATIC)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT) $(OBJECTS) $(LIBFLAGS)
+
+ nl.o : nlinternal.h nl.c
+ sock.o : nlinternal.h sock.h sock.c
+@@ -34,23 +29,14 @@
nltime.o : nlinternal.h nltime.c
install:
-+ mkdir -p $(LIBDIR) $(INCDIR) ; chmod 755 $(LIBDIR) $(INCDIR)
++ mkdir -p $(LIBDIR) $(INCDIR) ; chmod 755 $(LIBDIR) $(INCDIR)
cp $(OUTPUT) $(LIBDIR)
- cp $(STATIC) $(LIBDIR)
+- cp $(STATIC) $(LIBDIR)
chmod 755 $(LIBDIR)/$(OUTPUT)
- ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
- ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION)
@@ -15,18 +42,16 @@
+ ln -s $(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
+ ln -s $(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION)
+ ln -s $(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so
-+ ln -s $(OUTPUT) $(LIBDIR)/$(LIBNAME).so
cp ../include/nl.h $(INCDIR)/nl.h
chmod 644 $(INCDIR)/nl.h
+- @echo ""
+- @echo "*************************************************"
+- @echo "* Installed HawkNL. *"
+- @echo "* Remember to run /sbin/ldconfig before using *"
+- @echo "* the library, you may also want to check that *"
+- @echo "* $(LIBDIR) is included in /etc/ld.so.conf *"
+- @echo "* You must be root to run ldconfig. *"
+- @echo "*************************************************"
---- src/makefile.linux.old 2010-09-10 09:44:53.000000000 +0200
-+++ src/makefile.linux 2010-09-10 09:45:09.000000000 +0200
-@@ -13,7 +13,7 @@
- STATIC = libNL.a
- OPTFLAGS = -funroll-all-loops -ffast-math -fomit-frame-pointer -O2 -D_GNU_SOURCE -D_REENTRANT
- CFLAGS = -Wall -fPIC $(INCLUDE) $(OPTFLAGS)
--LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
-+LIBFLAGS = ${LDFLAGS} -shared -Wl,-soname,libNL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
- OBJECTS = crc.o errorstr.o nl.o sock.o group.o loopback.o err.o thread.o mutex.o condition.o nltime.o
-
- all: $(OBJECTS)
+ uninstall:
+ rm -f $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
diff --git a/dev-games/hawknl/hawknl-1.68-r2.ebuild b/dev-games/hawknl/hawknl-1.68-r2.ebuild
deleted file mode 100644
index ff46abad3e7a..000000000000
--- a/dev-games/hawknl/hawknl-1.68-r2.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit toolchain-funcs eutils multilib
-
-DESCRIPTION="A cross-platform network library designed for games"
-HOMEPAGE="http://www.hawksoft.com/hawknl/"
-SRC_URI="http://www.sonic.net/~philf/download/HawkNL${PV/./}src.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 hppa x86"
-IUSE="doc"
-
-RDEPEND=""
-DEPEND=""
-
-S=${WORKDIR}/hawknl${PV}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-build.patch
- sed -i\ -e '/echo /d' src/makefile.linux || die
-}
-
-src_compile() {
- emake -C src -f makefile.linux \
- CC="$(tc-getCC)" \
- OPTFLAGS="${CFLAGS} -D_GNU_SOURCE -D_REENTRANT"
-}
-
-src_install() {
- emake -j1 -C src -f makefile.linux \
- LIBDIR="${D}/usr/$(get_libdir)" \
- INCDIR="${D}/usr/include" install
- if use doc ; then
- dodoc -r samples
- fi
-}
diff --git a/dev-games/hawknl/hawknl-1.68-r3.ebuild b/dev-games/hawknl/hawknl-1.68-r3.ebuild
new file mode 100644
index 000000000000..1263783a20ec
--- /dev/null
+++ b/dev-games/hawknl/hawknl-1.68-r3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="A cross-platform network library designed for games"
+HOMEPAGE="http://www.hawksoft.com/hawknl/"
+SRC_URI="http://www.sonic.net/~philf/download/HawkNL${PV/./}src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE="examples"
+
+S="${WORKDIR}/${PN}${PV}"
+
+PATCHES=( "${FILESDIR}"/${P}-build.patch )
+
+src_configure() {
+ tc-export CC
+}
+
+src_compile() {
+ emake -C src -f makefile.linux
+}
+
+src_install() {
+ emake -j1 -C src -f makefile.linux \
+ LIBDIR="${ED}"/usr/$(get_libdir) \
+ INCDIR="${ED}"/usr/include install
+
+ dodoc src/{nlchanges.txt,readme.txt}
+ if use examples; then
+ docinto examples
+ dodoc -r samples/.
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}