aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Herrmann <dhn@FreeBSD.org>2011-12-28 15:52:16 +0000
committerDennis Herrmann <dhn@FreeBSD.org>2011-12-28 15:52:16 +0000
commit741a3cc30b25137546171e054e27694812e31bea (patch)
tree2f506662fcefa0a48d9d05dfbf514bb45dec9405
parent715e87b4c9e89672d44f7f61656ab4772478a617 (diff)
downloadports-741a3cc30b25137546171e054e27694812e31bea.tar.gz
ports-741a3cc30b25137546171e054e27694812e31bea.zip
- Fix build on 7.x
Submitted by: garga@ (via mail)
Notes
Notes: svn path=/head/; revision=288188
-rw-r--r--x11-wm/i3/Makefile4
-rw-r--r--x11-wm/i3/files/patch-i3-config-wizard__main.c25
2 files changed, 25 insertions, 4 deletions
diff --git a/x11-wm/i3/Makefile b/x11-wm/i3/Makefile
index e72cf979061c..83c76652c7e4 100644
--- a/x11-wm/i3/Makefile
+++ b/x11-wm/i3/Makefile
@@ -53,10 +53,6 @@ MAN1= ${MANUALS}
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 800000
-BROKEN= fails to compile and install
-.endif
-
post-extract:
@cd ${WRKSRC} && ${CP} i3.config config.sample
@cd ${WRKSRC} && ${CP} i3.welcome welcome
diff --git a/x11-wm/i3/files/patch-i3-config-wizard__main.c b/x11-wm/i3/files/patch-i3-config-wizard__main.c
new file mode 100644
index 000000000000..738af4e7858c
--- /dev/null
+++ b/x11-wm/i3/files/patch-i3-config-wizard__main.c
@@ -0,0 +1,25 @@
+--- ./i3-config-wizard/main.c.orig 2011-12-24 16:25:08.000000000 +0100
++++ ./i3-config-wizard/main.c 2011-12-28 09:38:11.000000000 +0100
+@@ -283,10 +283,11 @@
+
+ char *line = NULL;
+ size_t len = 0;
+-#if !defined(__APPLE__)
++#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 800000)
++ bool head_of_file = true;
++#else
+ ssize_t read;
+ #endif
+- bool head_of_file = true;
+
+ /* write a header about auto-generation to the output file */
+ fputs("# This file has been auto-generated by i3-config-wizard(1).\n", ks_config);
+@@ -296,7 +297,7 @@
+ fputs("# this file and re-run i3-config-wizard(1).\n", ks_config);
+ fputs("#\n", ks_config);
+
+-#if defined(__APPLE__)
++#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 800000)
+ while ((line = fgetln(kc_config, &len)) != NULL) {
+ #else
+ while ((read = getline(&line, &len, kc_config)) != -1) {