- fix this script by not using non-standard sed features.

with upstream
This commit is contained in:
jasper 2010-10-02 10:12:26 +00:00
parent ad492f7399
commit 08a593f57e
2 changed files with 12 additions and 56 deletions

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-gthumb_Makefile_in,v 1.1 2010/10/01 08:14:15 jasper Exp $
With the modified make-header.sh script, chage the way we run it.
--- gthumb/Makefile.in.orig Mon Sep 27 22:27:37 2010
+++ gthumb/Makefile.in Thu Sep 30 23:17:35 2010
@@ -3032,9 +3032,7 @@ gth-marshal.c: gth-marshal.h gth-marshal.list $(GLIB_G
&& $(GLIB_GENMARSHAL) $(srcdir)/gth-marshal.list --body --prefix=gth_marshal >> $@ )
gthumb.h: make-header.sh gthumb.h.template Makefile.am
- $(AM_V_GEN)( $(srcdir)/make-header.sh $(srcdir)/gthumb.h.template $(PUBLIC_HEADER_FILES) > xgen-$(@F) \
- && (cmp -s xgen-$(@F) gthumb.h || cp xgen-$(@F) gthumb.h ) \
- && rm -f xgen-$(@F) )
+ $(AM_V_GEN)( $(srcdir)/make-header.sh $(PUBLIC_HEADER_FILES) )
AUTHORS.tab : $(top_srcdir)/AUTHORS
$(AM_V_GEN)( sed -e 's/^/"/' -e 's/$$/",/' < $(top_srcdir)/AUTHORS > $@.tmp \

View File

@ -1,48 +1,21 @@
$OpenBSD: patch-gthumb_make-header_sh,v 1.1 2010/10/01 08:14:15 jasper Exp $
$OpenBSD: patch-gthumb_make-header_sh,v 1.2 2010/10/02 10:12:26 jasper Exp $
Overhaul the script, as it would put 'n' instead of '\n'
in the template file.
Don't use non-standard sed features.
GNOME bz #630837.
--- gthumb/make-header.sh.orig Thu Jul 15 20:45:39 2010
+++ gthumb/make-header.sh Thu Sep 30 23:12:27 2010
@@ -1,11 +1,34 @@
#!/bin/sh
--- gthumb/make-header.sh.orig Sat Oct 2 12:00:05 2010
+++ gthumb/make-header.sh Sat Oct 2 12:00:11 2010
@@ -3,9 +3,10 @@
template="$1"
-template="$1"
-
-shift
shift
-includes="\n"
+includes=
+includes="\\\\n"
for i in "$@"; do
- includes="${includes}#include <gthumb/"$i">\n"
+ includes="${includes} #include <gthumb/$i>\n"
+ includes="${includes}#include <gthumb/"$i">\\\\n"
done
-sed -e 's|@@|'"$includes"'|' $template
+echo "/* Do not edit. Autogenerated from src/make-header.sh */
+
+/*
+ * GThumb
+ *
+ * Copyright (C) 2009 The Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef GTHUMB_H
+#define GTHUMB_H
+$includes
+#endif /* GTHUMB_H */
+" > gthumb.h
+sed -e 's|@@|'"$includes"'|' -e 's|\\n|\
+|g' $template