You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/03/13 12:42:09 UTC

svn commit: r1577117 - /subversion/trunk/tools/dev/unix-build/Makefile.svn

Author: stsp
Date: Thu Mar 13 11:42:08 2014
New Revision: 1577117

URL: http://svn.apache.org/r1577117
Log:
* tools/dev/unix-build/Makefile.svn: Add gettext support to my custom
   build script, which is also used on the bb-openbsd bot. My own svn
   development builds now support i18n so I can test related code paths.

Modified:
    subversion/trunk/tools/dev/unix-build/Makefile.svn

Modified: subversion/trunk/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/unix-build/Makefile.svn?rev=1577117&r1=1577116&r2=1577117&view=diff
==============================================================================
--- subversion/trunk/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/trunk/tools/dev/unix-build/Makefile.svn Thu Mar 13 11:42:08 2014
@@ -81,6 +81,7 @@ RUBY_VER	= 1.8.7-p358
 BZ2_VER	= 1.0.6
 PYTHON_VER	= 2.7.3
 JUNIT_VER	= 4.10
+GETTEXT_VER	= 0.18.3.1
 
 BDB_DIST	= db-$(BDB_VER).tar.gz
 APR_ICONV_DIST	= apr-iconv-$(APR_ICONV_VER).tar.gz
@@ -94,6 +95,7 @@ RUBY_DIST	= ruby-$(RUBY_VER).tar.gz
 BZ2_DIST	= bzip2-$(BZ2_VER).tar.gz
 PYTHON_DIST	= Python-$(PYTHON_VER).tgz
 JUNIT_DIST	= junit-${JUNIT_VER}.jar
+GETTEXT_DIST	= gettext-$(GETTEXT_VER).tar.gz
 
 DISTFILES	= $(DISTDIR)/$(NEON_DIST) \
 		$(DISTDIR)/$(SERF_DIST) \
@@ -106,7 +108,8 @@ DISTFILES	= $(DISTDIR)/$(NEON_DIST) \
 		$(DISTDIR)/$(RUBY_DIST) \
 		$(DISTDIR)/$(BZ2_DIST) \
 		$(DISTDIR)/$(PYTHON_DIST) \
-		$(DISTDIR)/$(JUNIT_DIST)
+		$(DISTDIR)/$(JUNIT_DIST) \
+		$(DISTDIR)/$(GETTEXT_DIST)
 
 FETCH_CMD	= wget -c
 
@@ -128,6 +131,7 @@ RUBY_URL	= http://ftp.ruby-lang.org/pub/
 BZ2_URL		= http://bzip.org/$(BZ2_VER)/$(BZ2_DIST)
 PYTHON_URL	= http://python.org/ftp/python/$(PYTHON_VER)/$(PYTHON_DIST)
 JUNIT_URL	= http://downloads.sourceforge.net/project/junit/junit/$(JUNIT_VER)/$(JUNIT_DIST)
+GETTEXT_URL	= http://ftp.gnu.org/pub/gnu/gettext/$(GETTEXT_DIST)
 
 
 BDB_SRCDIR	= $(SRCDIR)/db-$(BDB_VER)
@@ -145,6 +149,7 @@ LIBMAGIC_SRCDIR	= $(SRCDIR)/file-$(LIBMA
 RUBY_SRCDIR	= $(SRCDIR)/ruby-$(RUBY_VER)
 BZ2_SRCDIR	= $(SRCDIR)/bzip2-$(BZ2_VER)
 PYTHON_SRCDIR	= $(SRCDIR)/Python-$(PYTHON_VER)
+GETTEXT_SRCDIR	= $(SRCDIR)/gettext-$(GETTEXT_VER)
 SVN_SRCDIR	= $(SVN_WC)
 
 BDB_OBJDIR	= $(OBJDIR)/db-$(BDB_VER)
@@ -162,6 +167,7 @@ LIBMAGIC_OBJDIR	= $(OBJDIR)/file-$(LIBMA
 RUBY_OBJDIR	= $(OBJDIR)/ruby-$(RUBY_VER)
 BZ2_OBJDIR	= $(OBJDIR)/bzip2-$(BZ2_VER)
 PYTHON_OBJDIR	= $(OBJDIR)/python-$(PYTHON_VER)
+GETTEXT_OBJDIR	= $(OBJDIR)/gettext-$(GETTEXT_VER)
 SVN_OBJDIR	= $(OBJDIR)/$(SVN_REL_WC)
 
 # Tweak this for out-of-tree builds. Note that running individual
@@ -174,7 +180,7 @@ PROFILE_CFLAGS=-pg
 endif
 
 # We need this to make sure some targets below pick up the right libraries
-LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/python/lib:$(PREFIX)/svn-$(WC)/lib
+LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/gettext/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/python/lib:$(PREFIX)/svn-$(WC)/lib
 
 #######################################################################
 # Main targets.
@@ -185,19 +191,19 @@ LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREF
 all: dirs-create bdb-install apr-install iconv-install apr-util-install \
 	httpd-install neon-install serf-install serf-old-install \
 	sqlite-install cyrus-sasl-install libmagic-install \
-	ruby-install bz2-install python-install \
+	ruby-install bz2-install python-install gettext-install \
 	svn-install svn-bindings-install
 
 # Use these to start a build from the beginning.
 reset: dirs-reset bdb-reset apr-reset iconv-reset apr-util-reset \
 	httpd-reset neon-reset serf-reset serf-old-reset sqlite-reset \
 	cyrus-sasl-reset libmagic-reset ruby-reset python-reset \
-	bz2-reset svn-reset
+	bz2-reset gettext-reset svn-reset
 
 # Use to save disk space.
 clean: bdb-clean apr-clean iconv-clean apr-util-clean httpd-clean \
 	neon-clean serf-clean serf-old-clean sqlite-clean cyrus-sasl-clean \
-	libmagic-clean ruby-clean bz2-clean python-clean svn-clean
+	libmagic-clean ruby-clean bz2-clean python-clean gettext-clean svn-clean
 
 # Nukes everything (including installed binaries!)
 # Use this to start ALL OVER AGAIN! Use with caution!
@@ -1118,6 +1124,62 @@ $(DISTDIR)/$(JUNIT_DIST):
 	cd $(DISTDIR) && $(FETCH_CMD) $(JUNIT_URL)
 
 #######################################################################
+# gettext
+#######################################################################
+
+gettext-retrieve:	$(GETTEXT_OBJDIR)/.retrieved
+gettext-configure:	$(GETTEXT_OBJDIR)/.configured
+gettext-compile:	$(GETTEXT_OBJDIR)/.compiled
+gettext-install:	$(GETTEXT_OBJDIR)/.installed
+gettext-reset:
+	$(foreach f, .retrieved .configured .compiled .installed, \
+		rm -f $(GETTEXT_OBJDIR)/$(f);)
+
+gettext-clean:
+	-(cd $(GETTEXT_OBJDIR) && env MAKEFLAGS= make clean)
+
+# fetch distfile for gettext
+$(DISTDIR)/$(GETTEXT_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(GETTEXT_URL)
+
+# retrieve gettext
+$(GETTEXT_OBJDIR)/.retrieved: $(DISTDIR)/$(GETTEXT_DIST)
+	[ -d $(GETTEXT_OBJDIR) ] || mkdir -p $(GETTEXT_OBJDIR)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(GETTEXT_DIST)
+	touch $@
+
+# (gettext won't compile outside its source tree)
+# configure gettext
+$(GETTEXT_OBJDIR)/.configured: $(GETTEXT_OBJDIR)/.retrieved
+	cd $(GETTEXT_SRCDIR) \
+		&& env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\
+		LDFLAGS="-L$(PREFIX)/iconv/lib" \
+		$(GETTEXT_SRCDIR)/configure \
+		--prefix=$(PREFIX)/gettext \
+		--with-libiconv-prefix=$(PREFIX)/iconv \
+		--disable-c++ \
+		--disable-java \
+		--disable-csharp \
+		$(THREADS_FLAG)
+	which gsed && \
+		sed -e 's/sed /gsed /g' < $(GETTEXT_SRCDIR)/build-aux/moopp \
+		> $(GETTEXT_SRCDIR)/build-aux/moopp.fixed && \
+		mv $(GETTEXT_SRCDIR)/build-aux/moopp.fixed \
+		$(GETTEXT_SRCDIR)/build-aux/moopp && \
+		chmod +x $(GETTEXT_SRCDIR)/build-aux/moopp
+	touch $@
+
+# compile gettext
+$(GETTEXT_OBJDIR)/.compiled: $(GETTEXT_OBJDIR)/.configured
+	(cd $(GETTEXT_SRCDIR) && env MAKEFLAGS= make)
+	touch $@
+
+# install gettext
+$(GETTEXT_OBJDIR)/.installed: $(GETTEXT_OBJDIR)/.compiled
+	(cd $(GETTEXT_SRCDIR) && env MAKEFLAGS= make install)
+	touch $@
+
+#######################################################################
 # svn
 #######################################################################
 
@@ -1225,10 +1287,11 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
 	$(RUBY_OBJDIR)/.installed $(PYTHON_OBJDIR)/.installed
 	cd $(SVN_SRCDIR) && ./autogen.sh
 	cd $(svn_builddir) && \
-		env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib $(SERF_LDFLAG)" \
+		env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib $(SERF_LDFLAG) -L$(PREFIX)/gettext/lib -L$(PREFIX)/iconv/lib" \
+			CFLAGS="-I$(PREFIX)/gettext/include" \
 			LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
 			GREP="`which grep`" \
-			PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$$PATH \
+			PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$(PREFIX)/gettext/bin:$$PATH \
 			$(SVN_SRCDIR)/configure \
 			--enable-maintainer-mode \
 			--with-ssl \



Re: svn commit: r1577117 - /subversion/trunk/tools/dev/unix-build/Makefile.svn

Posted by Ben Reser <be...@reser.org>.
On 3/13/14, 6:40 AM, Stefan Sperling wrote:
>> (FWIW, the fact that the bb-openbsd bot uses a different script from
>> other bots is also a problem, but IIUC Ben is working on addressing that.)
> 
> I'm quite happy that I have reproducible builds on OpenBSD and if necessary
> other *nix-like systems with full control and automation.
> 
> If Ben invents something similar that's great.
> I believe that diversity in the buildfarm doesn't hurt.

Branko's referring to my project to try and cleanup up the buildbot builders to
get them have some consistency.  By that I mean the following:

* Similar build bot setup patterns, I'd like to see the setup in the master
config be nearly identical for all the builders.  This doesn't mean all the
bots need to do the same tests or use the same dependencies.  Each builder is
still going to have all of their own scripts.

* Have all the builders get their scripts from Subversion
(trunk/tools/buildbot/slaves) in an automated way, allowing any of us to
disable tests or tweak the testing.

I completely agree that the build should be repeatable, we could get some of
that by using separate installs of the dependencies just for the bot, but I
think we want to test OS provided dependencies as well.  So at least some of
the bots, reproducibility comes down to someone not screwing with the installed
dependencies.

Re: svn commit: r1577117 - /subversion/trunk/tools/dev/unix-build/Makefile.svn

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Mar 13, 2014 at 01:34:51PM +0100, Branko Čibej wrote:
> On 13.03.2014 12:42, stsp@apache.org wrote:
> > Author: stsp
> > Date: Thu Mar 13 11:42:08 2014
> > New Revision: 1577117
> >
> > URL: http://svn.apache.org/r1577117
> > Log:
> > * tools/dev/unix-build/Makefile.svn: Add gettext support to my custom
> >    build script, which is also used on the bb-openbsd bot. My own svn
> >    development builds now support i18n so I can test related code paths.
> 
> I'm frankly not thrilled by the existence of "your own build script."
> How on earth do we know that what works for you will work for the rest
> of us who use the standard "autogen.sh; configure; make" sequence?

I want to control the set of dependencies independently from
what the operating system provides.

I want gdb traces into dependencies with debug symbols.

I want to type 'make', not all the crazy commands that the Makefile automates.

I was maintaining this Makefile outside of our repository for a long time.
Some years ago Hyrum suggested that I move it into our repo in case
it is useful to someone. If you're not happy with that I can move it elsewhere.

> (FWIW, the fact that the bb-openbsd bot uses a different script from
> other bots is also a problem, but IIUC Ben is working on addressing that.)

I'm quite happy that I have reproducible builds on OpenBSD and if necessary
other *nix-like systems with full control and automation.

If Ben invents something similar that's great.
I believe that diversity in the buildfarm doesn't hurt.

Re: svn commit: r1577117 - /subversion/trunk/tools/dev/unix-build/Makefile.svn

Posted by Branko Čibej <br...@wandisco.com>.
On 13.03.2014 12:42, stsp@apache.org wrote:
> Author: stsp
> Date: Thu Mar 13 11:42:08 2014
> New Revision: 1577117
>
> URL: http://svn.apache.org/r1577117
> Log:
> * tools/dev/unix-build/Makefile.svn: Add gettext support to my custom
>    build script, which is also used on the bb-openbsd bot. My own svn
>    development builds now support i18n so I can test related code paths.

I'm frankly not thrilled by the existence of "your own build script."
How on earth do we know that what works for you will work for the rest
of us who use the standard "autogen.sh; configure; make" sequence?

(FWIW, the fact that the bb-openbsd bot uses a different script from
other bots is also a problem, but IIUC Ben is working on addressing that.)

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com