* Makefile.in (pkgconfig-data): create pkg-config metadata file.

* tool/rbinstall.rb: install pkg-config metadata file.

* template/ruby.pc.in: template of pkg-config metadata file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-10-25 15:29:32 +00:00
Родитель a6ed06e513
Коммит 4d9a6ab181
6 изменённых файлов: 67 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,11 @@
Tue Oct 26 00:29:26 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* Makefile.in (pkgconfig-data): create pkg-config metadata file.
* tool/rbinstall.rb: install pkg-config metadata file.
* template/ruby.pc.in: template of pkg-config metadata file.
Mon Oct 25 16:38:07 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
* signal.c (rb_atomic_t): GCC (of at least recent versions)

Просмотреть файл

@ -178,6 +178,11 @@ $(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in
@./config.status --file=$@:$(srcdir)/template/fake.rb.in
@chmod +x $@
ruby_pc = @ruby_pc@
pkgconfig-data: $(ruby_pc)
$(ruby_pc): $(srcdir)/template/ruby.pc.in config.status
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in
install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/config.h \
$(LIBRUBY_A) $(LIBRUBY_SO) $(ARCHFILE)
$(MAKEDIRS) $(XRUBY_RUBYLIBDIR)/$(arch) $(XRUBY_RUBYHDRDIR)/$(arch)/ruby
@ -272,6 +277,7 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
clean-local::
@$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output
@-$(RM) $(pkgconfig_DATA)
distclean-local::
@$(RM) ext/config.cache $(RBCONFIG) Doxyfile

Просмотреть файл

@ -2657,6 +2657,7 @@ fi
unset sitearch
AS_CASE(["$target_os"],[mingw*],[sitearch="$target_cpu-$rb_cv_msvcrt"])
test ${sitearch+set} && AC_DEFINE_UNQUOTED(RUBY_SITEARCH, "${sitearch}")
: ${sitearch='${arch}'}
AC_ARG_WITH(search-path,
AS_HELP_STRING([--with-search-path=DIR], [specify the additional search path]),
@ -2771,6 +2772,16 @@ AC_CONFIG_FILES(Makefile, [{
${MAKE-make} info-program | grep '^PROGRAM=ruby$' > /dev/null ||
echo 'ruby: $(PROGRAM);' >> Makefile],
[EXEEXT='$EXEEXT' gnumake='$gnumake'])
ruby_pc="${RUBY_BASE_NAME}-${MAJOR}.${MINOR}.pc"
AC_SUBST(ruby_pc)
AC_CONFIG_FILES($ruby_pc:template/ruby.pc.in,
[
sed ['s/\$(\([A-Za-z_][A-Za-z0-9_]*\))/${\1}/g'] $ruby_pc > ruby.pc.tmp &&
mv -f ruby.pc.tmp $ruby_pc
],
[ruby_pc='$ruby_pc'])
AC_OUTPUT
dnl }
dnl }

30
template/ruby.pc.in Normal file
Просмотреть файл

@ -0,0 +1,30 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
MAJOR=@MAJOR@
MINOR=@MINOR@
TEENY=@TEENY@
ruby_version=@ruby_version@
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
LIBRUBYARG_SHARED=@LIBRUBYARG_SHARED@
LIBRUBYARG_STATIC=@LIBRUBYARG_STATIC@
LIBRUBYARG=@LIBRUBYARG@
LIBS=@LIBS@
ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@
rubyhdrdir=@rubyhdrdir@
vendorhdrdir=@vendorhdrdir@
sitehdrdir=@sitehdrdir@
arch=@arch@
sitearch=@sitearch@
Name: Ruby
Description: Object Oriented Script Language
Version: ${ruby_version}
Cflags: -I${rubyhdrdir}/${arch} -I${rubyhdrdir}
Libs: ${LIBRUBYARG_SHARED} ${LIBS}
Requires:

Просмотреть файл

@ -300,6 +300,8 @@ enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
dll = CONFIG["LIBRUBY_SO"]
lib = CONFIG["LIBRUBY"]
arc = CONFIG["LIBRUBY_A"]
major = CONFIG["MAJOR"]
minor = CONFIG["MINOR"]
install?(:local, :arch, :bin, :'bin-arch') do
prepare "binary commands", bindir
@ -336,6 +338,14 @@ install?(:local, :arch, :lib) do
end
end
install?(:local, :arch, :data) do
pc = CONFIG["ruby_pc"]
if File.exist?(pc)
prepare "pkgconfig data", pkgconfigdir = File.join(libdir, "pkgconfig")
install pc, pkgconfigdir, :mode => $data_mode
end
end
install?(:ext, :arch, :'ext-arch') do
prepare "extension objects", archlibdir
noinst = %w[-* -*/] | (CONFIG["no_install_files"] || "").split

Просмотреть файл

@ -1,11 +1,11 @@
#define RUBY_VERSION "1.9.3"
#define RUBY_RELEASE_DATE "2010-10-25"
#define RUBY_RELEASE_DATE "2010-10-26"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
#define RUBY_RELEASE_YEAR 2010
#define RUBY_RELEASE_MONTH 10
#define RUBY_RELEASE_DAY 25
#define RUBY_RELEASE_DAY 26
#include "ruby/version.h"