Initialize Tizen 2.3
[external/libtasn1.git] / packaging / libtasn1-1.3-pkgconfig.patch
1 diff -up libtasn1-1.3/lib/libtasn1-config.in.~1~ libtasn1-1.3/lib/libtasn1-config.in
2 --- libtasn1-1.3/lib/libtasn1-config.in.~1~     2008-02-01 17:14:52.000000000 +0100
3 +++ libtasn1-1.3/lib/libtasn1-config.in 2008-02-13 13:38:29.000000000 +0100
4 @@ -1,12 +1,8 @@
5 -#!/bin/sh
6 +#!/bin/bash
7  
8 -prefix=@prefix@
9 -exec_prefix=@exec_prefix@
10  exec_prefix_set=no
11  
12 -tasn1_libs="@LIBTASN1_LIBS@"
13 -tasn1_cflags="@LIBTASN1_CFLAGS@"
14 -tasn1_la_file="@libdir@/libtasn1.la"
15 +pkgopts=()
16  
17  usage()
18  {
19 @@ -22,6 +19,11 @@ EOF
20         exit $1
21  }
22  
23 +pkgcfg()
24 +{
25 +    ${PKG_CONFIG:-pkg-config} "${pkgopts[@]}" "$@" libtasn1
26 +}
27 +
28  if test $# -eq 0; then
29         usage 1 1>&2
30  fi
31 @@ -34,23 +36,23 @@ while test $# -gt 0; do
32  
33    case $1 in
34      --prefix=*)
35 -      prefix=$optarg
36 +      pkgopts=( "${pkgopts[@]}" "--define-variable=prefix=$optarg" )
37        if test $exec_prefix_set = no ; then
38 -       exec_prefix=$optarg
39 +         pkgopts=( "${pkgopts[@]}" "--define-variable=exec_prefix=$optarg" )
40        fi
41        ;;
42      --prefix)
43        echo_prefix=yes
44        ;;
45      --exec-prefix=*)
46 -      exec_prefix=$optarg
47 +      pkgopts=( "${pkgopts[@]}" "--define-variable=exec_prefix=$optarg" )
48        exec_prefix_set=yes
49        ;;
50      --exec-prefix)
51        echo_exec_prefix=yes
52        ;;
53      --version)
54 -      echo "@VERSION@"
55 +      pkgcfg --modversion
56        exit 0
57        ;;
58      --cflags)
59 @@ -60,7 +62,8 @@ while test $# -gt 0; do
60        echo_libs=yes
61        ;;
62      --la-file)
63 -      echo_la_file=yes
64 +      echo ".la file not shipped" >&2
65 +      exit 1
66        ;;
67      --help)
68        usage 0
69 @@ -73,32 +76,17 @@ while test $# -gt 0; do
70  done
71  
72  if test "$echo_prefix" = "yes"; then
73 -    echo $prefix
74 +    pkgcfg --variable=prefix
75  fi
76  
77  if test "$echo_exec_prefix" = "yes"; then
78 -    echo $exec_prefix
79 +    pkgcfg --variable=exec_prefix
80  fi
81  
82  if test "$echo_cflags" = "yes"; then
83 -    if test "@includedir@" != "/usr/include" ; then
84 -      includes="-I@includedir@"
85 -      for i in $tasn1_cflags ; do
86 -       if test "$i" = "-I@includedir@" ; then
87 -         includes=""
88 -       fi
89 -      done
90 -    fi
91 -    echo $includes $tasn1_cflags
92 -fi
93 -
94 -if test "$echo_la_file" = "yes"; then
95 -    echo ${tasn1_la_file}
96 +    pkgcfg --cflags
97  fi
98  
99  if test "$echo_libs" = "yes"; then
100 -    echo ${tasn1_libs}
101 +    pkgcfg --libs
102  fi
103 -
104 -
105 -