Date: Tue, 29 Aug 2006 21:42:05 +0400 (MSD) From: Stanislav Sedov <ssedov@mbsd.msk.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/102648: [PATCH]: lang/ruby18 - small fix to allow PREFIX-clean libs Message-ID: <20060829174205.1131E11B67@fonon.realnet> Resent-Message-ID: <200608291750.k7THoJNv093038@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 102648 >Category: ports >Synopsis: [PATCH]: lang/ruby18 - small fix to allow PREFIX-clean libs >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 29 17:50:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Stanislav Sedov >Release: FreeBSD 7.0-CURRENT i386 >Organization: MBSD labs, Inc. >Environment: System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Aug 2 21:44:37 MSD 2006 root@fonon.realnet:/work/src/fbsd-cur/src/sys/i386/compile/FONON i386 >Description: - Small fix to allow painless PREFIX-clean libraries ports creation. In case of different PREFIX we should dirrmtry site_ruby, otherwise it will be left there forever. But we can't really do dirrmtry, sice if ruby PREFIX == library PREFIX, these directories created by ruby installations will be removed as they are empty. This patch adds fake file into SITEARCHLIBDIR, so we could simply dirrmtry %%RUBY_SITEARCHLIBDIR%% and it will be removed when installed into different prefix and kept if the prefix is same. Similar hacks are already exists for DOCDIR and EXAMPLESDIR. This PR depends on ports/102646 >How-To-Repeat: >Fix: --- rr.diff begins here --- diff -ruN ruby18.orig/Makefile ruby18/Makefile --- ruby18.orig/Makefile Tue Aug 29 21:13:55 2006 +++ ruby18/Makefile Tue Aug 29 21:18:11 2006 @@ -205,6 +205,8 @@ @${FIND} ${RUBY_LIBDIR}/ ! -type d -depth 1 | \ ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} + @${ECHO_CMD} "${RUBY_SITEARCHLIBDIR}/.keep_me" | \ + ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} @${ECHO_CMD} "@unexec rmdir ${RUBY_SITEARCHLIBDIR} 2>/dev/null || true"\ >> ${TMPPLIST} @${ECHO_CMD} "@unexec rmdir ${RUBY_SITELIBDIR} 2>/dev/null || true" \ @@ -219,6 +221,7 @@ ${TOUCH} ${RUBY_ELISPDIR}/.keep_me.${RUBY_NAME} ${TOUCH} ${RUBY_EXAMPLESDIR}/.keep_me ${TOUCH} ${RUBY_DOCDIR}/.keep_me + ${TOUCH} ${RUBY_SITEARCHLIBDIR}/.keep_me .if !defined(NOPORTDOCS) ${MKDIR} ${EXTSAMPLES:C,^([^/]+)/.*,\1,:O:u:S,^,${RUBY_EXAMPLESDIR}/,} diff -ruN ruby18.orig/pkg-plist ruby18/pkg-plist --- ruby18.orig/pkg-plist Tue Aug 29 21:13:55 2006 +++ ruby18/pkg-plist Tue Aug 29 21:18:33 2006 @@ -225,8 +225,6 @@ %%RUBY_ELISPDIR%%/.keep_me.%%RUBY_NAME%% @dirrmtry %%RUBY_ELISPDIR%% -@exec /bin/mkdir -p %D/%%RUBY_SITEARCHLIBDIR%% - @exec /bin/mkdir -p %D/%%RUBY_RIDIR%% @exec env LC_TIME=C /bin/date > %D/%%RUBY_RIDIR%%/created.rid @unexec /bin/rm -f %D/%%RUBY_RIDIR%%/created.rid Binary files ruby18.orig/ruby-1.8.5_1,1.tbz and ruby18/ruby-1.8.5_1,1.tbz differ --- rr.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060829174205.1131E11B67>