packages/quilt: Add quilt version 0.45, 'cleanup'/complicate layout
authorHolger Freyther <zecke@selfish.org>
Sat, 5 Aug 2006 15:46:07 +0000 (15:46 +0000)
committerHolger Freyther <zecke@selfish.org>
Sat, 5 Aug 2006 15:46:07 +0000 (15:46 +0000)
    Quilt is the first package we will build, so special care must
    be taken. This is one reason why we do not include/require quilt_${PV}.inc
    directly.
    Now the -native packages require the quilt-native.inc package which
    adds the non-gnu patch for darwin/BSD. In quilt_PV.inc we will aplly
    the basic patches and in quilt.inc we will have all the common stuff
    (like we already had)
    quilt-0.45 does not require the nostrip patch as the file seems to
    be missing.

13 files changed:
packages/quilt/quilt-0.39/.mtn2git_empty [new file with mode: 0644]
packages/quilt/quilt-0.39/non-gnu.patch [moved from packages/quilt/files/non-gnu.patch with 100% similarity]
packages/quilt/quilt-0.39/nostrip.patch [moved from packages/quilt/files/nostrip.patch with 100% similarity]
packages/quilt/quilt-0.45/.mtn2git_empty [new file with mode: 0644]
packages/quilt/quilt-0.45/non-gnu.patch [new file with mode: 0644]
packages/quilt/quilt-native.inc [moved from packages/quilt/quilt-native_0.42.bb with 62% similarity]
packages/quilt/quilt-native_0.39.bb
packages/quilt/quilt-native_0.45.bb [new file with mode: 0644]
packages/quilt/quilt.inc
packages/quilt/quilt_0.39.bb
packages/quilt/quilt_0.39.inc [new file with mode: 0644]
packages/quilt/quilt_0.45.bb [moved from packages/quilt/quilt_0.42.bb with 80% similarity]
packages/quilt/quilt_0.45.inc [new file with mode: 0644]

diff --git a/packages/quilt/quilt-0.39/.mtn2git_empty b/packages/quilt/quilt-0.39/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/quilt/quilt-0.45/.mtn2git_empty b/packages/quilt/quilt-0.45/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/quilt/quilt-0.45/non-gnu.patch b/packages/quilt/quilt-0.45/non-gnu.patch
new file mode 100644 (file)
index 0000000..c1cbfb3
--- /dev/null
@@ -0,0 +1,223 @@
+Patch is from the Fink projetc (http://fink.sf.net)
+
+diff -r 7b51c215fc54 Makefile.in
+--- a/Makefile.in      Sat Mar  4 17:16:21 2006 -0800
++++ b/Makefile.in      Sat Mar  4 17:59:09 2006 -0800
+@@ -256,7 +256,7 @@ bin/guards.1 : bin/guards
+               -e 's:@VERSION''@:$(VERSION):g'                         \
+               -e 's:@RELEASE''@:$(RELEASE):g'                         \
+               -e 's:@LOCALEDIR''@:$(localedir):g'                     \
+-              -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g'  \
++              -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g'     \
+               $< > $@
+       @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
+@@ -320,11 +320,11 @@ endif
+       $(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
+       $(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
+-      $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++      $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+       $(INSTALL) -m 644 doc/README                                    \
+-                 $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++                 $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+       $(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL                 \
+-                 $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++                 $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+       $(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
+       $(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
+@@ -367,7 +367,7 @@ uninstall ::
+                  $(notdir $(MAN1)))                                   \
+              $(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt           \
+              $(BUILD_ROOT)$(etcdir)/quilt.quiltrc                     \
+-             $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++             $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+ check: $(TESTS:test/%.test=test/.%.ok)
+ check-all: $(TESTS:test/%.test=check-%)
+diff -r 7b51c215fc54 configure
+--- a/configure        Sat Mar  4 17:16:21 2006 -0800
++++ b/configure        Sat Mar  4 17:59:09 2006 -0800
+@@ -3882,29 +3882,6 @@ echo "$as_me: error: Please specify the 
+   fi
+-echo "$as_me:$LINENO: checking whether $CP -l works" >&5
+-echo $ECHO_N "checking whether $CP -l works... $ECHO_C" >&6
+-touch conftest.1
+-if $CP -l conftest.1 conftest.2 2>/dev/null; then
+-      echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+-else
+-      { { echo "$as_me:$LINENO: error: no
+-
+-You appear to have a \`cp' that does not support hard links.
+-You can download GNU fileutils from ftp.gnu.org
+-" >&5
+-echo "$as_me: error: no
+-
+-You appear to have a \`cp' that does not support hard links.
+-You can download GNU fileutils from ftp.gnu.org
+-" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-
+-
+-
+ # Check whether --with-date or --without-date was given.
+ if test "${with_date+set}" = set; then
+@@ -3999,32 +3976,6 @@ echo "$as_me: WARNING: Using internal da
+       INTERNAL_DATE=1
+   fi
+-
+-
+-
+-if test -z "$INTERNAL_DATE"; then
+-  echo "$as_me:$LINENO: checking whether $DATE --rfc-822 works" >&5
+-echo $ECHO_N "checking whether $DATE --rfc-822 works... $ECHO_C" >&6
+-  if $DATE --rfc-822 >/dev/null 2>/dev/null; then
+-      echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+-  else
+-      { { echo "$as_me:$LINENO: error: no
+-
+-If you don't have a version of \`date' that supports --rfc-822, you
+-can specify '--without-date' and $PACKAGE_NAME will use its own
+-internal date.
+-" >&5
+-echo "$as_me: error: no
+-
+-If you don't have a version of \`date' that supports --rfc-822, you
+-can specify '--without-date' and $PACKAGE_NAME will use its own
+-internal date.
+-" >&2;}
+-   { (exit 1); exit 1; }; }
+-  fi
+-fi
+-
+diff -r 7b51c215fc54 quilt/diff.in
+--- a/quilt/diff.in    Sat Mar  4 17:16:21 2006 -0800
++++ b/quilt/diff.in    Sat Mar  4 17:59:09 2006 -0800
+@@ -303,7 +303,7 @@ then
+       if [ ${#files[@]} -gt 0 ] \
+          && ! ( cd $QUILT_PC/$last_patch &&
+-                cp -l --parents "${files[@]}" $workdir/ )
++                mycpl $workdir/ "${files[@]}" )
+       then
+               printf $"Failed to copy files to temporary directory\n" >&2
+               die 1
+diff -r 7b51c215fc54 quilt/mail.in
+--- a/quilt/mail.in    Sat Mar  4 17:16:21 2006 -0800
++++ b/quilt/mail.in    Sat Mar  4 17:59:09 2006 -0800
+@@ -64,7 +64,7 @@ with a template for the introduction. Pl
+ msgid()
+ {
+-      local timestamp=$(date --utc "+%Y%m%d%H%M%S.%N")
++      local timestamp=$(date -u "+%Y%m%d%H%M%S.000000000")
+       echo "$timestamp@${opt_sender#*@}"
+ }
+@@ -334,7 +334,7 @@ introduction="$(gen_tempfile)"
+       cat <<-EOF
+       Message-Id: <$(msgid)>
+       User-Agent: quilt/@VERSION@-@RELEASE@
+-      Date: $(date --rfc-822)
++      Date: $(date '+%a, %d %b %Y %H:%M:%S %z')
+       From: ${opt_from:-$opt_sender}
+       To: $(IFS=,; echo "${opt_to[*]}")
+       Cc: $(IFS=,; echo "${opt_cc[*]}")
+@@ -401,7 +401,11 @@ fi
+ # increment the timestamp by one second and wait with sending until
+ # that time has arrived. This allows MUAs to show the messages in the
+ # correct order.
+-last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
++#last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
++# fink has no date available that does -d, so we fudge with the time now.
++# If the user edits the date field in the message patch 0 could end up
++# out of order wrt the actual patches. just a minor cosmetic nit.
++last_ts=$(date '+%s')
+ num=1
+ for patch in "${patches[@]}"; do
+@@ -412,7 +416,7 @@ for patch in "${patches[@]}"; do
+       #       sleep 1
+       #done
+       ((last_ts++))
+-      new_date="$(date --rfc-822 -d "1970/01/01 UTC $last_ts seconds")"
++      new_date="$(date -r $last_ts '+%a, %d %b %Y %H:%M:%S %z')"
+       modify="$(awk '
+       sub(/^Recipient-/, "")  { r = $0
+diff -r 7b51c215fc54 quilt/pop.in
+--- a/quilt/pop.in     Sat Mar  4 17:16:21 2006 -0800
++++ b/quilt/pop.in     Sat Mar  4 17:59:09 2006 -0800
+@@ -93,7 +93,7 @@ check_for_pending_changes()
+       if [ -d $QUILT_PC/$patch ]
+       then
+               if ! rmdir $workdir ||  # note that this is racey...
+-                 ! cp -rl $QUILT_PC/$patch $workdir
++                 ! (for i in "$(find "$QUILT_PC/$patch" -type f)"; do mycpl $workdir $i; done)
+               then
+                       printf $"Failed to copy files to temporary directory\n" >&2
+                       rm -rf $workdir
+diff -r 7b51c215fc54 quilt/scripts/patchfns.in
+--- a/quilt/scripts/patchfns.in        Sat Mar  4 17:16:21 2006 -0800
++++ b/quilt/scripts/patchfns.in        Sat Mar  4 17:59:09 2006 -0800
+@@ -45,6 +45,28 @@ fi
+ fi
+ # ========================================================
++
++dater()
++{
++  ts=$(perl -e '@st = stat($ARGV[0]); print $st[9];' "$1")
++  fmt=$(date -r $ts "$2")
++
++  echo $fmt
++}
++
++mycpl ()
++{
++  target=$1
++  shift;
++
++  for src in "$@"
++  do
++    srcdir="${src%/*}"
++    test -n "$srcdir" && mkdir -p "$target/$srcdir"
++    ln $src "$target/$src"
++  done
++}
++
+ #declare -a exit_handlers
+ #
+@@ -669,8 +691,7 @@ diff_file()
+               || old_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
+       else
+               [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
+-              || old_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
+-                                      -r "$old_file")
++              || old_date=$'\t'$(dater "$old_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
+       fi
+       if ! [ -s "$new_file" ]
+       then
+@@ -682,8 +703,7 @@ diff_file()
+               || new_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
+       else
+               [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
+-              || new_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
+-                                      -r "$new_file")
++              || new_date=$'\t'$(dater "$new_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
+       fi
+       diff $QUILT_DIFF_OPTS $old_file $new_file \
similarity index 62%
rename from packages/quilt/quilt-native_0.42.bb
rename to packages/quilt/quilt-native.inc
index 612c041..d19d864 100644 (file)
@@ -1,5 +1,8 @@
-require quilt.inc
+require quilt_${PV}.inc
+
+SRC_URI_append_build-darwin = "?   file://non-gnu.patch;patch=1 "
 RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/quilt-${PV}"
 
 INHIBIT_AUTOTOOLS_DEPS = "1"
 
index 612c041..7caa9f6 100644 (file)
@@ -1,14 +1,2 @@
-require quilt.inc
-RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native"
-
-INHIBIT_AUTOTOOLS_DEPS = "1"
-
-inherit autotools native
-
-PATCHCLEANCMD = ""
-PATCHCMD = "num='%s'; name='%s'; file='%s'; patch -p "$num" -i "$file""
-EXTRA_OECONF = "--disable-nls"
-
-do_configure () {
-       oe_runconf
-}
+PV="0.39"
+require quilt-native.inc
diff --git a/packages/quilt/quilt-native_0.45.bb b/packages/quilt/quilt-native_0.45.bb
new file mode 100644 (file)
index 0000000..033f323
--- /dev/null
@@ -0,0 +1,2 @@
+PV="0.45"
+require quilt-native.inc
index cd5e85c..387ec8f 100644 (file)
@@ -4,10 +4,6 @@ SECTION = "devel"
 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
 LICENSE = "GPL"
 
-SRC_URI = "http://download.savannah.gnu.org/releases/quilt/quilt-${PV}.tar.gz \
-          file://install.patch;patch=1 \
-          file://nostrip.patch;patch=1"
-
-SRC_URI_append_build-darwin = "           file://non-gnu.patch;patch=1 "
+SRC_URI = "http://download.savannah.gnu.org/releases/quilt/quilt-${PV}.tar.gz "
 
 S = "${WORKDIR}/quilt-${PV}"
index f86ab59..9a08b19 100644 (file)
@@ -1,6 +1,6 @@
 RDEPENDS_${PN} += "patch diffstat bzip2"
 
-require quilt.inc
+require quilt_${PV}.inc
 
 inherit autotools gettext
 
diff --git a/packages/quilt/quilt_0.39.inc b/packages/quilt/quilt_0.39.inc
new file mode 100644 (file)
index 0000000..4fbbb03
--- /dev/null
@@ -0,0 +1,5 @@
+require quilt.inc
+
+SRC_URI += "file://install.patch;patch=1 \
+          file://nostrip.patch;patch=1"
+
similarity index 80%
rename from packages/quilt/quilt_0.42.bb
rename to packages/quilt/quilt_0.45.bb
index f86ab59..9a08b19 100644 (file)
@@ -1,6 +1,6 @@
 RDEPENDS_${PN} += "patch diffstat bzip2"
 
-require quilt.inc
+require quilt_${PV}.inc
 
 inherit autotools gettext
 
diff --git a/packages/quilt/quilt_0.45.inc b/packages/quilt/quilt_0.45.inc
new file mode 100644 (file)
index 0000000..bf6267b
--- /dev/null
@@ -0,0 +1,3 @@
+require quilt.inc
+
+SRC_URI += "file://install.patch;patch=1"