6 # Pkg-config files are built so that they give correct paths
7 # if they are used to create a DEV package, however, they do
8 # not give correct paths if we want to get stuff directly from
11 # This script creates modified pkg-config files which point
12 # directly to irreco sources. This ensures that linking works.
17 fix_pkg_config_path_main
()
21 --path|path
) fix_pkg_config_path
"${ARGS[@]:1}";;
22 --clean|clean
) fix_pkg_config_clean
"${ARGS[@]:1}";;
23 *) echo "Error: Unknown command \"$1\"";
30 grep -v '^Cflags:' $IRRECO_DIR/data
/irreco.pc
> .
/script
/tmp
/irreco.pc
31 echo -n "Cflags: -I" >> .
/script
/tmp
/irreco.pc
32 echo -n `readlink -f $IRRECO_DIR/src/api` >> .
/script
/tmp
/irreco.pc
33 echo -n " -I" >> .
/script
/tmp
/irreco.pc
34 echo -n `readlink -f $IRRECO_DIR/src/util` >> .
/script
/tmp
/irreco.pc
35 echo >> .
/script
/tmp
/irreco.pc
37 grep -v '^Libs:' $IRRECO_DIR/data
/irreco-util.pc
> .
/script
/tmp
/irreco-util.pc
38 echo -n "Libs: -L" >> .
/script
/tmp
/irreco-util.pc
39 echo -n "$1" >> .
/script
/tmp
/irreco-util.pc
40 echo -n " -l_irreco_util" >> .
/script
/tmp
/irreco-util.pc
41 echo >> .
/script
/tmp
/irreco.pc
44 fix_pkg_config_clean
()
46 rm -fv .
/script
/tmp
/irreco.pc
47 rm -fv .
/script
/tmp
/irreco-util.pc
50 fix_pkg_config_path_main
"$@"