pkgsrc/graphics/freetype2/buildlink-freetype-config.in

38 lines
1,008 B
Text
Raw Normal View History

#!/bin/sh
#
# $NetBSD: buildlink-freetype-config.in,v 1.1 2001/07/13 08:18:29 jlam Exp $
#
# If FreeType2 is distributed as part of XFree86, then it's missing a
# freetype-config script that emits the preprocessor and linker flags
# necessary to find the FreeType2 headers and libraries. This script
# provides that functionality within the buildlink framework and is used
# by freetype2/buildlink.mk.
while [ $# -gt 0 ]
do
case "$1" in
-*=*) optarg=`echo "$1" | @SED@ 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*|--prefix|--exec-prefix=*|--exec-prefix)
echo @X11BASE@
;;
--version)
freetype_h=@X11BASE@/include/freetype2/freetype/freetype.h
major=`@AWK@ '/.*#define.*FREETYPE_MAJOR/ { print $3 }' ${freetype_h}`
minor=`@AWK@ '/.*#define.*FREETYPE_MINOR/ { print $3 }' ${freetype_h}`
echo ${major}.${minor}
exit 0
;;
--cflags)
echo -I@BUILDLINK_DIR@/include/freetype2 ${includes}
;;
--libs)
echo -L@BUILDLINK_DIR@/lib -lfreetype
;;
esac
shift
done