Load rbconfig.rb before referring to Config and unbreak.

This commit is contained in:
Akinori MUSHA 2003-07-31 22:16:01 +00:00
parent 2bee5db542
commit 57b5c30e65
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=86088
4 changed files with 4 additions and 52 deletions

View File

@ -81,10 +81,11 @@ PLIST_SUB+= IF_DEFAULT=${IF_DEFAULT}
do-fetch:
@${DO_NADA}
.if defined(STATIC)
post-patch:
.if defined(STATIC)
${RUBY} -i -pe 'gsub /-rdynamic/, "-static"' ${WRKSRC}/configure.in
.endif
${RUBY} -i -pe '$$. == 1 and puts %q/require "rbconfig.rb"/' ${WRKSRC}/ext/bdb1/extconf.rb
do-extract:
${MKDIR} ${WRKDIR}

View File

@ -1,25 +0,0 @@
--- ext/bdb1/extconf.rb.orig Fri Dec 27 22:32:58 2002
+++ ext/bdb1/extconf.rb Sun Apr 27 05:35:25 2003
@@ -1,9 +1,10 @@
#!/usr/bin/ruby
require 'mkmf'
+require 'rbconfig'
-$stat_lib = if CONFIG.key?("LIBRUBYARG_STATIC")
+$stat_lib = if Config::CONFIG.key?("LIBRUBYARG_STATIC")
$LDFLAGS += " -L#{CONFIG['libdir']}"
- CONFIG["LIBRUBYARG_STATIC"]
+ Config::CONFIG["LIBRUBYARG_STATIC"]
else
"-lruby"
end
@@ -40,8 +41,7 @@
unknown: $(DLLIB)
\t@echo "main() {}" > /tmp/a.c
-\t$(CC) -static /tmp/a.c $(OBJS) $(CPPFLAGS) $(DLDFLAGS) #$stat_lib #{CONFIG["LIBS"
-]} $(LIBS) $(LOCAL_LIBS)
+\t$(CC) -static /tmp/a.c $(OBJS) $(CPPFLAGS) $(DLDFLAGS) #$stat_lib #{Config::CONFIG["LIBS"]} $(LIBS) $(LOCAL_LIBS)
\t@-rm /tmp/a.c a.out
test: $(DLLIB)

View File

@ -81,10 +81,11 @@ PLIST_SUB+= IF_DEFAULT=${IF_DEFAULT}
do-fetch:
@${DO_NADA}
.if defined(STATIC)
post-patch:
.if defined(STATIC)
${RUBY} -i -pe 'gsub /-rdynamic/, "-static"' ${WRKSRC}/configure.in
.endif
${RUBY} -i -pe '$$. == 1 and puts %q/require "rbconfig.rb"/' ${WRKSRC}/ext/bdb1/extconf.rb
do-extract:
${MKDIR} ${WRKDIR}

View File

@ -1,25 +0,0 @@
--- ext/bdb1/extconf.rb.orig Fri Dec 27 22:32:58 2002
+++ ext/bdb1/extconf.rb Sun Apr 27 05:35:25 2003
@@ -1,9 +1,10 @@
#!/usr/bin/ruby
require 'mkmf'
+require 'rbconfig'
-$stat_lib = if CONFIG.key?("LIBRUBYARG_STATIC")
+$stat_lib = if Config::CONFIG.key?("LIBRUBYARG_STATIC")
$LDFLAGS += " -L#{CONFIG['libdir']}"
- CONFIG["LIBRUBYARG_STATIC"]
+ Config::CONFIG["LIBRUBYARG_STATIC"]
else
"-lruby"
end
@@ -40,8 +41,7 @@
unknown: $(DLLIB)
\t@echo "main() {}" > /tmp/a.c
-\t$(CC) -static /tmp/a.c $(OBJS) $(CPPFLAGS) $(DLDFLAGS) #$stat_lib #{CONFIG["LIBS"
-]} $(LIBS) $(LOCAL_LIBS)
+\t$(CC) -static /tmp/a.c $(OBJS) $(CPPFLAGS) $(DLDFLAGS) #$stat_lib #{Config::CONFIG["LIBS"]} $(LIBS) $(LOCAL_LIBS)
\t@-rm /tmp/a.c a.out
test: $(DLLIB)