From 0fd8da5e6b53d42c35d5bc2bdc418851aeb68f64 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 23 Jan 2014 12:42:25 -0600 Subject: [PATCH] Newer versions of the helper scripts upstream --- data/libApp.pc.in | 2 +- data/pkgconfig.sh | 28 ++++++++++++++++++++++++---- doc/gtkdoc.sh | 20 +++++++++++++++++--- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/data/libApp.pc.in b/data/libApp.pc.in index 4e0b8b9..7dda952 100644 --- a/data/libApp.pc.in +++ b/data/libApp.pc.in @@ -3,7 +3,7 @@ includedir=${prefix}/include exec_prefix=${prefix} libdir=${exec_prefix}/lib -Name: libApp +Name: @PACKAGE@ Description: DeforaOS System essential library Version: @VERSION@ Requires: libSystem diff --git a/data/pkgconfig.sh b/data/pkgconfig.sh index 2350501..cac86f9 100755 --- a/data/pkgconfig.sh +++ b/data/pkgconfig.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2011-2013 Pierre Pronchery +#Copyright (c) 2011-2014 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -26,7 +26,7 @@ #variables PREFIX="/usr/local" -. "../config.sh" +[ -f "../config.sh" ] && . "../config.sh" DEBUG="_debug" DEVNULL="/dev/null" #executables @@ -45,6 +45,14 @@ _debug() } +#error +_error() +{ + echo "pkgconfig.sh: $@" 1>&2 + return 2 +} + + #usage _usage() { @@ -85,6 +93,16 @@ if [ $# -eq 0 ]; then exit $? fi +#check the variables +if [ -z "$PACKAGE" ]; then + _error "The PACKAGE variable needs to be set" + exit $? +fi +if [ -z "$VERSION" ]; then + _error "The VERSION variable needs to be set" + exit $? +fi + PKGCONFIG="$PREFIX/lib/pkgconfig" while [ $# -gt 0 ]; do target="$1" @@ -118,9 +136,11 @@ while [ $# -gt 0 ]; do fi #create - $DEBUG $SED -e "s;@PREFIX@;$PREFIX;" \ + $DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;" \ -e "s;@VERSION@;$VERSION;" \ - -e "s;@RPATH@;$RPATH;" -- "$target.in" > "$target" + -e "s;@PREFIX@;$PREFIX;" \ + -e "s;@RPATH@;$RPATH;" \ + -- "$target.in" > "$target" if [ $? -ne 0 ]; then $DEBUG $RM -- "$target" exit 2 diff --git a/doc/gtkdoc.sh b/doc/gtkdoc.sh index 6dddc47..86de5d4 100755 --- a/doc/gtkdoc.sh +++ b/doc/gtkdoc.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2012-2013 Pierre Pronchery +#Copyright (c) 2012-2014 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -26,8 +26,7 @@ #variables PREFIX="/usr/local" -. "../config.sh" -MODULE="$PACKAGE" +[ -f "../config.sh" ] && . "../config.sh" #executables DEBUG="_debug" GTKDOC_FIXXREF="gtkdoc-fixxref" @@ -50,6 +49,14 @@ _debug() } +#error +_error() +{ + echo "gtkdoc.sh: $@" 1>&2 + return 2 +} + + #usage _usage() { @@ -90,6 +97,13 @@ if [ $# -eq 0 ]; then exit $? fi +#check the variables +if [ -z "$PACKAGE" ]; then + _error "The PACKAGE variable needs to be set" + exit $? +fi +MODULE="$PACKAGE" + [ -z "$DATADIR" ] && DATADIR="$PREFIX/share" instdir="$DATADIR/gtk-doc/html"