Bug#721080: RFS: vpcs/0.5b0-1 [ITP]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Fri, 27 Sep 2013 12:52:38 +0100
Daniel Lintott <daniel@serverb.co.uk> kirjoitti:
> I managed to my own question in the end regarding DESTDIR, thanks to
> the following post on the list
> http://lists.debian.org/debian-mentors/2011/03/msg00127.html
That’s good.
I still see problems with the assumptions the build system
has about the operating system. The source itself also
needs patching if that platform is wanted to be supported.
Here are my changes to build on kfreebsd:
* In d/rules, detect GNU/kFreeBSD and define macros GNUkFreeBSD and
FreeBSD.
* Add a patch to adjust a few lines if GNUkFreeBSD is defined.
I’ll attach a patch that can be applied to the git repository, so you
can see the actual modifications.
Cheers,
Juhani Numminen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
iQEcBAEBCgAGBQJSRpX3AAoJEICGa2KP4xPG1q0IAMIWbk0N8nSrDrZNxYJSXC7E
WzmeVQ2daLUPWTuCUZT0gNM8xWfGP/XHYJUwfvBzz+GhcPAGAfaPWC/7cLM9c9Ek
OE2z3VmZjRghqQLFQ+RiVXRuV/+9bNEHpkoluFUmlPcABos3Qbh9oWk/BDyYAPBS
d5O8DANeO8lIrwEF5KjhO1V6k7+zTjkgymbvDLgq6ZhQVDTIbii2H95T/6BGJKK6
guH/GZsy0b1DRm+3fZkzL+2GvVau8gPlVUiduUGIpP0bsd7d+HpOuzZ3y8Sz299X
0kWy0KazojjGWUZi6ogVPrlMRmIvyHITWL1HznmzjYhIn8o55SNhgqpo+zr5//g=
=utuP
-----END PGP SIGNATURE-----
From d9a793696c9bb9595335fc3349b716188356e4ce Mon Sep 17 00:00:00 2001
From: Juhani Numminen <juhaninumminen0@gmail.com>
Date: Sat, 28 Sep 2013 14:25:21 +0300
Subject: [PATCH] Build on Debian GNU/kFreeBSD
---
debian/patches/BuildOnGNUkFreeBSD | 34 ++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 4 ++++
3 files changed, 39 insertions(+)
create mode 100644 debian/patches/BuildOnGNUkFreeBSD
diff --git a/debian/patches/BuildOnGNUkFreeBSD b/debian/patches/BuildOnGNUkFreeBSD
new file mode 100644
index 0000000..9d62d9e
--- /dev/null
+++ b/debian/patches/BuildOnGNUkFreeBSD
@@ -0,0 +1,34 @@
+Description: Build also on GNU/kfreeBSD
+Author: Juhani Numminen <juhaninumminen0@gmail.com>
+
+--- vpcs-0.5b0.orig/src/daemon.c
++++ vpcs-0.5b0/src/daemon.c
+@@ -51,7 +51,7 @@
+
+ #ifdef Darwin
+ #include <util.h>
+-#elif Linux
++#elif Linux || GNUkFreeBSD
+ #include <pty.h>
+ #elif FreeBSD
+ #include <libutil.h>
+--- vpcs-0.5b0.orig/src/hv.c
++++ vpcs-0.5b0/src/hv.c
+@@ -55,7 +55,7 @@
+
+ #ifdef Darwin
+ #include <util.h>
+-#elif Linux
++#elif Linux || GNUkFreeBSD
+ #include <pty.h>
+ #elif FreeBSD
+ #include <libutil.h>
+@@ -389,7 +389,7 @@ run_vpcs(int ac, char **av)
+
+ /* reinitialized, maybe call getopt twice */
+ optind = 1;
+-#if (defined(FreeBSD) || defined(Darwin))
++#if ((!defined(GNUkFreeBSD) && defined(FreeBSD)) || defined(Darwin))
+ optreset = 1;
+ #endif
+ while ((c = getopt(ac, av, "p:m:s:c:")) != -1) {
diff --git a/debian/patches/series b/debian/patches/series
index 19d3446..d54252f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
ManpageFix
LinuxMakefilePatch
CreateTopLevelMakefile
+BuildOnGNUkFreeBSD
diff --git a/debian/rules b/debian/rules
index 6645f38..6676cb0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,11 @@
# To enable all, uncomment following line
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
+export DEB_CFLAGS_MAINT_APPEND = -DGNUkFreeBSD -DFreeBSD -Wall -I. -DHV -Wno-strict-aliasing
+else
export DEB_CFLAGS_MAINT_APPEND = -DLinux -Wall -I. -DTAP -DHV -Wno-strict-aliasing
+endif
export DEB_LDFLAGS_MAINT_APPEND = -lpthread -lutil -s
%:
--
1.8.4.rc3
Reply to: