diff options
author | dinoex <dinoex@FreeBSD.org> | 2013-12-01 23:32:42 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2013-12-01 23:32:42 +0800 |
commit | 31d7a0f3af9f3ab4bdc1de075bf2f64711aabc64 (patch) | |
tree | 039c5d161c866af2a2c22bdb095805d96a4a0f93 | |
parent | d5af9a0d139a77df946cbe439830548fd7d44556 (diff) | |
download | freebsd-ports-gnome-31d7a0f3af9f3ab4bdc1de075bf2f64711aabc64.tar.gz freebsd-ports-gnome-31d7a0f3af9f3ab4bdc1de075bf2f64711aabc64.tar.zst freebsd-ports-gnome-31d7a0f3af9f3ab4bdc1de075bf2f64711aabc64.zip |
- use STAGEDIR
-rw-r--r-- | textproc/eruby/Makefile | 37 | ||||
-rw-r--r-- | textproc/eruby/files/patch-configure.rb | 35 | ||||
-rw-r--r-- | textproc/eruby/pkg-plist | 1 |
3 files changed, 45 insertions, 28 deletions
diff --git a/textproc/eruby/Makefile b/textproc/eruby/Makefile index 3590ef0336cd..988d71d6137d 100644 --- a/textproc/eruby/Makefile +++ b/textproc/eruby/Makefile @@ -12,8 +12,6 @@ DIST_SUBDIR= ruby MAINTAINER= dinoex@FreeBSD.org COMMENT= Interprets Ruby code embedded in a text file like PHP/ePerl/ASP/JSP -NO_STAGE= yes - USE_RUBY= yes CONFIGURE_ARGS= --enable-shared --with-charset="${DEFAULT_CHARSET}" @@ -22,8 +20,6 @@ USE_LDCONFIG= yes DEFAULT_CHARSET?= ISO-8859-1 -MAN1= eruby.1 - RUBY_RD_FILES= eruby.rd DOCS_EN= COPYING ChangeLog README.en \ @@ -31,35 +27,30 @@ DOCS_EN= COPYING ChangeLog README.en \ ${RUBY_RD_HTML_FILES} DOCS_JA= README.ja +.include <bsd.port.pre.mk> + do-configure: - @cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} configure.rb ${CONFIGURE_ARGS} + cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} configure.rb ${CONFIGURE_ARGS} + ${REINPLACE_CMD} -e 's|^XLDFLAGS = .*|XLDFLAGS = -L${PREFIX}/lib|' \ + -e 's|-Wl,$$(libdir)|-Wl,${PREFIX}/lib|' \ + -e 's|-L$$(libdir)|-L${PREFIX}/lib|' \ + ${WRKSRC}/Makefile post-install: -.if !defined(NOPORTEXAMPLES) - ${MKDIR} ${RUBY_MODEXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/* ${RUBY_MODEXAMPLESDIR}/ +.if ${PORT_OPTIONS:MEXAMPLES} + ${MKDIR} ${STAGEDIR}${RUBY_MODEXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${RUBY_MODEXAMPLESDIR}/ .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${RUBY_MODDOCDIR}/ja +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${RUBY_MODDOCDIR}/ja .for f in ${DOCS_EN} - ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/ .endfor .for f in ${DOCS_JA} - ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ja/ + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/ja/ .endfor .endif -.include <bsd.port.pre.mk> - -.if !defined(WITHOUT_PTHREADS) -.if ${RUBY_VERSION} == 1.8.7.160 -# ruby18 -r rbconfig -e "p Config::CONFIG['LIBS']" should output: -# "-lcrypt -lm -rpath=/usr/lib:/usr/local/lib -pthread" -# but 1.8.7.160 missing pthread -CONFIGURE_ENV+= EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -pthread" -.endif -.endif - .if ${RUBY_VER} == "1.9" CONFIGURE_ENV+= EXTRA_CFLAGS="${EXTRA_CFLAGS} -DWITH_RUBY_19" .endif diff --git a/textproc/eruby/files/patch-configure.rb b/textproc/eruby/files/patch-configure.rb index 0f0b16f1196b..580a0893e05b 100644 --- a/textproc/eruby/files/patch-configure.rb +++ b/textproc/eruby/files/patch-configure.rb @@ -1,11 +1,36 @@ ---- configure.rb.orig 2010-02-17 16:52:48.000000000 +0100 -+++ configure.rb 2010-02-17 16:52:48.000000000 +0100 -@@ -317,7 +317,16 @@ +--- configure.rb.orig 2013-11-16 10:18:41.000000000 +0100 ++++ configure.rb 2013-11-16 10:27:26.000000000 +0100 +@@ -210,6 +210,7 @@ + + $stdout.sync = true + ++# include RbConfig ? + drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/ + prefix = Regexp.new("\\A" + Regexp.quote(CONFIG["prefix"])) + $drive = CONFIG["prefix"] =~ drive ? $& : '' +@@ -293,14 +294,14 @@ + + $arch = CONFIG["arch"] + $sitearch = CONFIG["sitearch"] +-$ruby_version = Config::CONFIG["ruby_version"] || ++$ruby_version = CONFIG["ruby_version"] || + CONFIG["MAJOR"] + "." + CONFIG["MINOR"] + + $CC = CONFIG["CC"] + $AR = CONFIG["AR"] + $LD = "$(CC)" + $RANLIB = CONFIG["RANLIB"] +-$ruby = arg_config("--ruby", File.join(Config::CONFIG["bindir"], CONFIG["ruby_install_name"])) ++$ruby = arg_config("--ruby", File.join(CONFIG["bindir"], CONFIG["ruby_install_name"])) + $RUBY = ($nmake && !$configure_args.has_key?('--ruby')) ? $ruby.gsub(%r'/', '\\') : $ruby + if RUBY_VERSION < "1.8.0" + $RM = 'rm -f' +@@ -317,7 +318,16 @@ else $CFLAGS = CFLAGS + " " + CONFIG["CCDLFLAGS"] end +if not CONFIG["rubyhdrdir"].nil? -+ $CFLAGS << " -I" + CONFIG["rubyhdrdir"] + "/" + $sitearch ++ $CFLAGS << " -I" + RbConfig::CONFIG["rubyhdrdir"] + "/" + $sitearch +end +if not ENV["EXTRA_CFLAGS"].nil? + $CFLAGS << " " + ENV["EXTRA_CFLAGS"] @@ -17,7 +42,7 @@ if $LDFLAGS.to_s.empty? && /mswin32/ =~ RUBY_PLATFORM $LDFLAGS = "-link -incremental:no -pdb:none" end -@@ -435,7 +444,7 @@ +@@ -435,7 +445,7 @@ AC_MSG_CHECKING("whether we are using gcc") if $CC == "gcc" || `#{$CC} -v 2>&1` =~ /gcc/ $using_gcc = true diff --git a/textproc/eruby/pkg-plist b/textproc/eruby/pkg-plist index 4f6a21583b4f..5bf7c42a6ef3 100644 --- a/textproc/eruby/pkg-plist +++ b/textproc/eruby/pkg-plist @@ -3,6 +3,7 @@ include/eruby.h lib/liberuby.so.10 lib/liberuby.so lib/liberuby.a +man/man1/eruby.1.gz %%RUBY_SITEARCHLIBDIR%%/eruby.so %%PORTEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/e2r.rb %%PORTEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/foo.rhtml |