summaryrefslogtreecommitdiff
path: root/editors/jed
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2010-04-06 12:42:49 +0000
committerRenato Botelho <garga@FreeBSD.org>2010-04-06 12:42:49 +0000
commit03ae0408b632202c71cc3142ccbe8335bfeddf81 (patch)
tree75b6314c719a080d1ccf3618a024f60897200d19 /editors/jed
parentChase clamav's lib bump (diff)
Add 2 more OPTIONS to respect read-only files and don't try to host lookup
PR: ports/145006 Submitted by: Grzegorz Blach <magik@roorback.net>
Notes
Notes: svn path=/head/; revision=252319
Diffstat (limited to 'editors/jed')
-rw-r--r--editors/jed/Makefile18
-rw-r--r--editors/jed/files/extra-patch-src__userinfo.c12
2 files changed, 28 insertions, 2 deletions
diff --git a/editors/jed/Makefile b/editors/jed/Makefile
index 513b71992c7b..2f4ece6cea0e 100644
--- a/editors/jed/Makefile
+++ b/editors/jed/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jed
PORTVERSION= 0.99.19
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= editors
MASTER_SITES= ftp://space.mit.edu/pub/davis/jed/v${PORTVERSION:R}/ \
ftp://ftp.uni-stuttgart.de/pub/unix/misc/slang/jed/v${PORTVERSION:R}/ \
@@ -22,7 +22,9 @@ LIB_DEPENDS= slang.2:${PORTSDIR}/devel/libslang2
CONFLICTS= jed-devel-[0-9]*
-OPTIONS= X11 "Build xjed (depends of X11)" on
+OPTIONS= X11 "Build xjed (depends of X11)" on \
+ PERMS "Respect permissions by Root" off \
+ HOSTLOOKUP "Look-up for hostname" on
USE_BZIP2= yes
DIST_SUBDIR= jed
@@ -54,6 +56,11 @@ ALL_TARGET+= xjed
PLIST_SUB+= XJED=""
.endif
+.if defined(WITHOUT_HOSTLOOKUP)
+HOSTNAME_CMD= /bin/hostname
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src__userinfo.c
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's,(DEST_JED_ROOT)/doc,(DEST_DOC_DIR),g' \
-e 's,\.\./info/\*,,' \
@@ -63,6 +70,13 @@ post-patch:
@${REINPLACE_CMD} -e '/MKINSDIR.*DEST_DOC_DIR/d' \
${WRKSRC}/src/Makefile.in
.endif
+.if defined(WITHOUT_PERMS)
+ @${REINPLACE_CMD} 's|jed_file_is_readonly (file, 1)|jed_file_is_readonly (file, 0)|' ${WRKSRC}/src/file.c
+.endif
+.if defined(WITHOUT_HOSTLOOKUP)
+ @${REINPLACE_CMD} -e "s/%%JED_HOSTNAME%%/$$(${HOSTNAME_CMD})/" \
+ ${WRKSRC}/src/userinfo.c
+.endif
post-configure:
@${REINPLACE_CMD} -e 's,\(.usr.bin.install\) *-c,\1 -s -m 555,' \
diff --git a/editors/jed/files/extra-patch-src__userinfo.c b/editors/jed/files/extra-patch-src__userinfo.c
new file mode 100644
index 000000000000..5e6775bdd30c
--- /dev/null
+++ b/editors/jed/files/extra-patch-src__userinfo.c
@@ -0,0 +1,12 @@
+--- src/userinfo.c.orig 2010-04-06 09:21:49.000000000 -0300
++++ src/userinfo.c 2010-04-06 09:22:18.000000000 -0300
+@@ -5,6 +5,9 @@
+ * You may distribute this file under the terms the GNU General Public
+ * License. See the file COPYING for more information.
+ */
++
++#define JED_HOSTNAME "%%JED_HOSTNAME%%"
++
+ #include "config.h"
+ #include "jed-feat.h"
+