pkgsrc/games/fltk-sudoku/Makefile
dsainty 1f40f3a084 Mechanically replace references to graphics/jpeg with the suitable
alternative from mk/jpeg.buildlink3.mk

This allows selection of an alternative jpeg library (namely the x86 MMX,
SSE, SSE2 accelerated libjpeg-turbo) via JPEG_DEFAULT=libjpeg-turbo, and
follows the current standard model for alternatives (fam, motif, fuse etc).

The mechanical edits were applied via the following script:

#!/bin/sh
for d in */*; do
  [ -d "$d" ] || continue
  for i in "$d/"Makefile* "$d/"*.mk; do
    case "$i" in *.orig|*"*"*) continue;; esac
    out="$d/x"
    sed -e 's;graphics/jpeg/buildlink3\.mk;mk/jpeg.buildlink3.mk;g' \
        -e 's;BUILDLINK_PREFIX\.jpeg;JPEGBASE;g' \
        < "$i" > "$out"
    if cmp -s "$i" "$out"; then
      rm -f "$out"
    else
      echo "Edited $i"
      mv -f "$i" "$i.orig" && mv "$out" "$i"
    fi
  done
done
2010-12-23 11:44:24 +00:00

63 lines
1.9 KiB
Makefile

# $NetBSD: Makefile,v 1.9 2010/12/23 11:44:31 dsainty Exp $
DISTNAME= fltk-1.1.7-source
PKGNAME= fltk-sudoku-1.1.7
PKGREVISION= 4
VERS= ${DISTNAME:S/fltk-//:S/-source//}
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fltk/} \
ftp://ftp2.easysw.com/pub/fltk/${VERS}/ \
ftp://ftp3.easysw.com/pub/fltk/${VERS}/ \
http://ftp.easysw.com/pub/fltk/${VERS}/ \
http://mirror.nu6.org/ftp.easysw.com/pub/fltk/${VERS}/ \
ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/fltk/${VERS}/ \
ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/${VERS}/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.easysw.com/~mike/sudoku/index.html
COMMENT= FLTK example Sudoku game creator and solver
PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/${DISTNAME:S/-source//}
USE_LANGUAGES= c c++
USE_TOOLS+= gmake
USE_LIBTOOL= yes
PTHREAD_OPTS+= require
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-libtool=${LIBTOOL:Q}
CONFIGURE_ARGS+= --enable-threads
SUBST_CLASSES+= config
SUBST_STAGE.config= post-configure
SUBST_MESSAGE.config= Adjusting paths to fltk libraries in configure result
SUBST_FILES.config= makeinclude fltk-config
SUBST_SED.config= -e "s|../lib/|${PREFIX}/lib/|g"
SUBST_CLASSES+= config2
SUBST_STAGE.config2= post-configure
SUBST_MESSAGE.config2= Adjusting paths to fltk libraries in Sudoku's Makefile
SUBST_FILES.config2= test/Makefile
SUBST_SED.config2= -e "s|../lib/||g"
BUILD_DIRS= test
BUILD_TARGET= sudoku
INSTALLATION_DIRS= bin
SETGIDGAME= yes
SPECIAL_PERMS= bin/fltk-sudoku ${SETGID_GAMES_PERMS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/test/sudoku ${DESTDIR}${PREFIX}/bin/fltk-sudoku
BUILDLINK_DEPMETHOD.libXt?= build
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../x11/fltk/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"