diff options
author | garga <garga@FreeBSD.org> | 2010-04-06 20:42:49 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2010-04-06 20:42:49 +0800 |
commit | 7df1703694528fe824e6266a0b05af000430245a (patch) | |
tree | cc4d178fca6a310b800f04089e63080a05e85f3e /editors/jed | |
parent | 01285a8d15ff7ff315931f960441b24e4bd41c4b (diff) | |
download | freebsd-ports-gnome-7df1703694528fe824e6266a0b05af000430245a.tar.gz freebsd-ports-gnome-7df1703694528fe824e6266a0b05af000430245a.tar.zst freebsd-ports-gnome-7df1703694528fe824e6266a0b05af000430245a.zip |
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>
Diffstat (limited to 'editors/jed')
-rw-r--r-- | editors/jed/Makefile | 18 | ||||
-rw-r--r-- | editors/jed/files/extra-patch-src__userinfo.c | 12 |
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" + |