[Libreoffice] How to build for 3.3

Miklos Vajna vmiklos at frugalware.org
Mon Nov 8 12:39:35 PST 2010


Hi,

I read the wiki page

http://wiki.documentfoundation.org/Development/How_to_build

and noticed we do not mention anything about how to build the
libreoffice-3.3 branch.

Here is what works for me:

git clone /path/to/build.git libreoffice-3-3
cd libreoffice-3-3
git checkout --track origin/libreoffice-3-3 *
./autogen.sh
./download
bin/g checkout --track origin/libreoffice-3-3 *
make unpack **
cd rawbuild
<usual build dance>

*: additional command that could be mentioned on the wiki page
**: I get a warning called:

Checking for current branch of /home/vmiklos/git/libreoffice/libreoffice-3-3/clone/sdk ... warning, current branch is libreoffice-3-3

when that make target is executed.

Two questions:

1) Is there a better approach to do this, or this is the way to go? If
the later is the case, then I want to document this on the above wiki
page.

2) I'm attaching two patches:

a) Avoid the usage of git-branch (usual problem: git-branch is a git
porcelain command so its output may change any time without notice).

b) Don't check if master is checkout out, check if the branch is the
same as the branch of build.git, so that people won't get a warning
during proper libreoffice-3-3 build.

Is it OK to push these patches to libreoffice-3-3? (I would push them to
master, but make unpack is broken there for me, saying:
make: /home/vmiklos/git/libreoffice/bin/transform: Command not found)

Thanks.
-------------- next part --------------
From adc319cbd1e9436b9606329f3abb7b607c040984 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon, 8 Nov 2010 21:34:08 +0100
Subject: [PATCH 1/2] unpack: avoid using git-branch

git-branch is porcelain, use plumbing commands instead.
---
 bin/unpack |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/bin/unpack b/bin/unpack
index 135a33a..933191b 100755
--- a/bin/unpack
+++ b/bin/unpack
@@ -43,12 +43,11 @@ check_git_repo()
     tree="$CLONEDIR/$1"
     $echo_n "Checking for current branch of $tree ... $echo_c";
     if cd "$tree" >/dev/null 2>&1 ; then
-	IS_MASTER=`git branch | grep '^\* master$'`
-        if test -n "$IS_MASTER" ; then
+        CURRENT_BRANCH=`git symbolic-ref HEAD|sed 's|.*/||'`
+        if test "$CURRENT_BRANCH" = "master"; then
             echo "ok"
         else
-            $echo_n "warning, current branch is "
-	    git branch | grep '^\*' | sed 's/^.//'
+            echo "warning, current branch is $CURRENT_BRANCH"
         fi
     else
         echo "missing the $tree clone; run './download'"
-- 
1.7.3.2

-------------- next part --------------
From c3dd03f2627ef9f3faea7e10b3aac3eda2f09d51 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon, 8 Nov 2010 21:36:10 +0100
Subject: [PATCH 2/2] unpack: don't warn on master branch

Don't check if the 'master' branch of the repos is checked out, check if
the branch is the same as the branch of the parent repo.
---
 bin/unpack |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bin/unpack b/bin/unpack
index 933191b..553180d 100755
--- a/bin/unpack
+++ b/bin/unpack
@@ -42,9 +42,10 @@ check_git_repo()
 {
     tree="$CLONEDIR/$1"
     $echo_n "Checking for current branch of $tree ... $echo_c";
+    BUILD_BRANCH=`git symbolic-ref HEAD|sed 's|.*/||'`
     if cd "$tree" >/dev/null 2>&1 ; then
         CURRENT_BRANCH=`git symbolic-ref HEAD|sed 's|.*/||'`
-        if test "$CURRENT_BRANCH" = "master"; then
+        if test "$CURRENT_BRANCH" = "$BUILD_BRANCH"; then
             echo "ok"
         else
             echo "warning, current branch is $CURRENT_BRANCH"
-- 
1.7.3.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20101108/c19fb8b5/attachment.pgp>


More information about the LibreOffice mailing list