Date: Tue, 17 Feb 2009 15:52:52 +0900 (JST) From: <mitsuru@riken.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/131771: upgrade devel/ruby-zoom port Message-ID: <200902170652.n1H6qquU098995@zebu.yokohama.riken.jp> Resent-Message-ID: <200902170720.n1H7K1UV028902@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 131771 >Category: ports >Synopsis: upgrade devel/ruby-zoom port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Feb 17 07:20:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: >Release: FreeBSD 7.1-RELEASE >Organization: >Environment: System: FreeBSD 7.1-RELEASE >Description: upgrade devel/ruby-zoom port to 0.4.1. I think it's better to be renamed as rubygem-zoom. >How-To-Repeat: >Fix: diff -ruN ruby-zoom.old/Makefile ruby-zoom/Makefile --- ruby-zoom.old/Makefile 2009-02-17 15:42:19.000000000 +0900 +++ ruby-zoom/Makefile 2009-02-17 15:40:39.000000000 +0900 @@ -6,41 +6,103 @@ # PORTNAME= zoom -PORTVERSION= 0.2.0 -PORTREVISION= 1 -CATEGORIES= devel ruby -MASTER_SITES= ${MASTER_SITE_RUBYFORGE} +PORTVERSION= 0.4.1 +CATEGORIES= devel rubygems +MASTER_SITES= RF MASTER_SITE_SUBDIR= ruby-${PORTNAME} -PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} -DISTNAME= ruby-${PORTNAME}-${PORTVERSION} -DIST_SUBDIR= ruby +PKGNAMEPREFIX?= rubygem- +EXTRACT_SUFX= .gem +EXTRACT_ONLY= MAINTAINER= mitsuru@riken.jp COMMENT= A Ruby binding to the Z39.50 Object-Orientation Model (ZOOM) LIB_DEPENDS= yaz.3:${PORTSDIR}/net/yaz +EXTRACT_CMD= ${RUBYGEMBIN} +EXTRACT_BEFORE_ARGS= unpack +EXTRACT_AFTER_ARGS= + USE_RUBY= yes +USE_RAKE= yes USE_RUBY_EXTCONF= yes +RUBY_EXTCONF_SUBDIRS= src +CONFIGURE_ARGS= --with-opt-dir=${PREFIX} -DOCS= ChangeLog README doc/ascii/api.txt doc/xhtml/* +.include <bsd.port.pre.mk> -RUBY_REQUIRE= Ruby > 180 +.if ${RUBY_VER} == "1.8" +BUILD_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems +RUN_DEPENDS+= ${BUILD_DEPENDS} +.endif -.include <bsd.port.pre.mk> +DIST_SUBDIR= rubygem -.if !defined(RUBY_PROVIDED) -IGNORE= only works with Ruby 1.8.0 or later +GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER} +GEMS_DIR= ${GEMS_BASE_DIR}/gems +DOC_DIR= ${GEMS_BASE_DIR}/doc +CACHE_DIR= ${GEMS_BASE_DIR}/cache +SPEC_DIR= ${GEMS_BASE_DIR}/specifications +GEM_NAME?= ${PORTNAME}-${PORTVERSION} +GEM_LIB_DIR= ${GEMS_DIR}/${GEM_NAME} +GEM_DOC_DIR= ${DOC_DIR}/${GEM_NAME} +GEM_SPEC= ${SPEC_DIR}/${GEM_NAME}.gemspec +GEM_CACHE= ${CACHE_DIR}/${GEM_NAME}.gem + +PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ + REV="${RUBY_GEM}" \ + GEMS_BASE_DIR="lib/ruby/gems/${RUBY_VER}" \ + GEMS_DIR="${GEMS_DIR}" \ + DOC_DIR="${DOC_DIR}" \ + CACHE_DIR="${CACHE_DIR}" \ + SPEC_DIR="${SPEC_DIR}" \ + PORT="${PORTNAME}-${PORTVERSION}" \ + GEM_NAME="${GEM_NAME}" \ + GEM_LIB_DIR="${GEM_LIB_DIR}" \ + GEM_DOC_DIR="${GEM_DOC_DIR}" \ + GEM_SPEC="${GEM_SPEC}" \ + GEM_CACHE="${GEM_CACHE}" \ + EXTRACT_SUFX="${EXTRACT_SUFX}" + +RUBYGEMBIN= ${LOCALBASE}/bin/gem${RUBY_VER:S/.//} + +.if defined(DISTFILES) +GEMFILES= ${DISTFILES:C/:[^:]+$//} +.else +GEMFILES= ${DISTNAME}${EXTRACT_SUFX} .endif -post-install: -.if !defined(NOPORTDOCS) - ${MKDIR} ${RUBY_MODDOCDIR} -.for f in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ -.endfor - ${MKDIR} ${RUBY_MODEXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/sample/* ${RUBY_MODEXAMPLESDIR}/ +do-extract: + @${RM} -rf ${WRKDIR} + @${MKDIR} ${WRKDIR} + @for f in ${_DISTFILES}; do \ + if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$f ${EXTRACT_AFTER_ARGS});\ + then \ + exit 1; \ + fi; \ + done +.if !defined(EXTRACT_PRESERVE_OWNERSHIP) + @if [ `${ID} -u` = 0 ]; then \ + ${CHMOD} -R ug-s ${WRKDIR}; \ + ${CHOWN} -R 0:0 ${WRKDIR}; \ + fi .endif +do-build: + @(cd ${BUILD_WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} && ${RAKE_BIN} package) + +do-install: +.for _D in ${GEMFILES} + @(cd ${BUILD_WRKSRC}/pkg; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install -l --no-update-sources --no-ri --install-dir ${PREFIX}/lib/ruby/gems/${RUBY_VER} ${DISTDIR}/${DIST_SUBDIR}/${_D} -- --build-args ${CONFIGURE_ARGS}) +.endfor + +# This target is only meant to be used by the port maintainer. +x-generate-plist: + ${ECHO} %%GEM_CACHE%% > pkg-plist.new + ${FIND} ${PREFIX}/${GEM_DOC_DIR} -type f | ${SED} -e 's,${PREFIX}/${GEM_DOC_DIR},%%GEM_DOC_DIR%%,' >> pkg-plist.new + ${FIND} ${PREFIX}/${GEM_LIB_DIR} -type f | ${SED} -e 's,${PREFIX}/${GEM_LIB_DIR},%%GEM_LIB_DIR%%,' >> pkg-plist.new + ${ECHO} %%GEM_SPEC%% >> pkg-plist.new + ${FIND} ${PREFIX}/${GEM_LIB_DIR} -type d -depth | ${SED} -e 's,${PREFIX}/${GEM_LIB_DIR},@dirrm %%GEM_LIB_DIR%%,' >> pkg-plist.new + ${FIND} ${PREFIX}/${GEM_DOC_DIR} -type d -depth | ${SED} -e 's,${PREFIX}/${GEM_DOC_DIR},@dirrm %%GEM_DOC_DIR%%,' >> pkg-plist.new + .include <bsd.port.post.mk> diff -ruN ruby-zoom.old/distinfo ruby-zoom/distinfo --- ruby-zoom.old/distinfo 2009-02-17 15:42:19.000000000 +0900 +++ ruby-zoom/distinfo 2008-12-12 19:21:55.000000000 +0900 @@ -1,3 +1,3 @@ -MD5 (ruby/ruby-zoom-0.2.0.tar.gz) = ef85f8aa8a78666fdd46c95d91a23e7c -SHA256 (ruby/ruby-zoom-0.2.0.tar.gz) = 364bf3abd0074142bc60a852a76b29fe0915bb1ce6250c7a39a0e55a8c4c7974 -SIZE (ruby/ruby-zoom-0.2.0.tar.gz) = 24168 +MD5 (rubygem/zoom-0.4.1.gem) = 8f061f41f607dede2f26d7055b5cd3ac +SHA256 (rubygem/zoom-0.4.1.gem) = 54d469d16100b9f03b9ccc2ca008900f89c6b262d04dd383c8276db1d44061d2 +SIZE (rubygem/zoom-0.4.1.gem) = 23552 diff -ruN ruby-zoom.old/files/patch-extconf.rb ruby-zoom/files/patch-extconf.rb --- ruby-zoom.old/files/patch-extconf.rb 2009-02-17 15:42:19.000000000 +0900 +++ ruby-zoom/files/patch-extconf.rb 2009-02-17 15:22:26.000000000 +0900 @@ -1,10 +1,11 @@ ---- extconf.rb.org Fri Sep 2 20:18:20 2005 -+++ extconf.rb Fri Sep 2 20:38:41 2005 -@@ -9,6 +9,6 @@ - err "Yaz ZOOM header not available" unless have_header("yaz/zoom.h") +--- src/extconf.rb.org 2009-02-17 15:21:54.000000000 +0900 ++++ src/extconf.rb 2009-02-06 16:29:04.000000000 +0900 +@@ -11,7 +11,7 @@ + end $CFLAGS << " #{`yaz-config --cflags`} " -$LDFLAGS << " #{`yaz-config --libs`} " -+$LDFLAGS << " #{`yaz-config --libs`}".chomp ++$LDFLAGS << " #{`yaz-config --libs`.chomp} " + + create_makefile("zoom") - create_makefile("zoom", "src") diff -ruN ruby-zoom.old/pkg-plist ruby-zoom/pkg-plist --- ruby-zoom.old/pkg-plist 2009-02-17 15:42:19.000000000 +0900 +++ ruby-zoom/pkg-plist 2009-02-17 15:35:02.000000000 +0900 @@ -1,15 +1,62 @@ -%%RUBY_SITEARCHLIBDIR%%/zoom.so -%%RUBY_SITELIBDIR%%/marc.rb -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ChangeLog -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/README -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/api.txt -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/api.xml -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ch01.html -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ch02.html -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ch03.html -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ch04.html -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/docbook.css -%%PORTDOCS%%%%RUBY_MODDOCDIR%%/index.html -%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/hello.rb -%%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%% -%%PORTDOCS%%@dirrm %%RUBY_MODEXAMPLESDIR%% +%%GEM_CACHE%% +%%GEM_LIB_DIR%%/src/rbzoomquery.c +%%GEM_LIB_DIR%%/src/rbzoomresultset.c +%%GEM_LIB_DIR%%/src/rbzoomoptions.c +%%GEM_LIB_DIR%%/src/rbzoompackage.c +%%GEM_LIB_DIR%%/src/rbzoomrecord.c +%%GEM_LIB_DIR%%/src/rbzoom.c +%%GEM_LIB_DIR%%/src/rbzoomconnection.c +%%GEM_LIB_DIR%%/src/rbzoom.h +%%GEM_LIB_DIR%%/src/extconf.rb +%%GEM_LIB_DIR%%/src/mkmf.log +%%GEM_LIB_DIR%%/src/Makefile +%%GEM_LIB_DIR%%/src/rbzoomquery.o +%%GEM_LIB_DIR%%/src/rbzoomresultset.o +%%GEM_LIB_DIR%%/src/rbzoomoptions.o +%%GEM_LIB_DIR%%/src/rbzoompackage.o +%%GEM_LIB_DIR%%/src/rbzoomrecord.o +%%GEM_LIB_DIR%%/src/rbzoom.o +%%GEM_LIB_DIR%%/src/rbzoomconnection.o +%%GEM_LIB_DIR%%/src/zoom.so +%%GEM_LIB_DIR%%/test/record.dat +%%GEM_LIB_DIR%%/test/search_test.rb +%%GEM_LIB_DIR%%/test/search_batch_test.rb +%%GEM_LIB_DIR%%/test/thread_test.rb +%%GEM_LIB_DIR%%/test/package_live.rb +%%GEM_LIB_DIR%%/test/package_test.rb +%%GEM_LIB_DIR%%/test/record.txt +%%GEM_LIB_DIR%%/test/record-update.xml +%%GEM_LIB_DIR%%/test/record.xml +%%GEM_LIB_DIR%%/test/zebra/zebra.cfg +%%GEM_LIB_DIR%%/test/zebra/records/programming_ruby.xml +%%GEM_LIB_DIR%%/test/zebra/records/programming_ruby_update.xml +%%GEM_LIB_DIR%%/test/zebra/register/empty_file +%%GEM_LIB_DIR%%/test/zebra/shadow/empty_file +%%GEM_LIB_DIR%%/test/zebra/tab/string.chr +%%GEM_LIB_DIR%%/test/zebra/tab/record.abs +%%GEM_LIB_DIR%%/test/zebra/tab/bib1.att +%%GEM_LIB_DIR%%/test/zebra/tab/default.idx +%%GEM_LIB_DIR%%/test/zebra/tab/usmarc.mar +%%GEM_LIB_DIR%%/test/zebra/tab/numeric.chr +%%GEM_LIB_DIR%%/test/zebra/key/empty_file +%%GEM_LIB_DIR%%/test/zebra/lock/empty_file +%%GEM_LIB_DIR%%/sample/hello.rb +%%GEM_LIB_DIR%%/sample/needle.rb +%%GEM_LIB_DIR%%/README +%%GEM_LIB_DIR%%/ChangeLog +%%GEM_LIB_DIR%%/Rakefile +%%GEM_LIB_DIR%%/lib/zoom.so +%%GEM_SPEC%% +@dirrm %%GEM_LIB_DIR%%/src +@dirrm %%GEM_LIB_DIR%%/test/zebra/records +@dirrm %%GEM_LIB_DIR%%/test/zebra/register +@dirrm %%GEM_LIB_DIR%%/test/zebra/shadow +@dirrm %%GEM_LIB_DIR%%/test/zebra/tab +@dirrm %%GEM_LIB_DIR%%/test/zebra/key +@dirrm %%GEM_LIB_DIR%%/test/zebra/lock +@dirrm %%GEM_LIB_DIR%%/test/zebra +@dirrm %%GEM_LIB_DIR%%/test +@dirrm %%GEM_LIB_DIR%%/sample +@dirrm %%GEM_LIB_DIR%%/lib +@dirrm %%GEM_LIB_DIR%% +@dirrm %%GEM_DOC_DIR%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902170652.n1H6qquU098995>