This commit is contained in:
milisbir 2018-02-01 14:32:43 +02:00
parent fd1142be54
commit be439e9a3a
3 changed files with 177 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Tanım: Açık kaynaklı karakter tanıma (OCR)
# URL: http://jocr.sourceforge.net/index.html
# Paketçi: Cihan_Alkan
# Gerekler: netpbm
# Grup: ofis_düzenleyici
isim=gocr
surum=0.51
devir=1
kaynak=(https://www-e.uni-magdeburg.de/jschulen/ocr/gocr-${surum}.tar.gz)
derle() {
cd "$SRC"/$isim-$surum
export CFLAGS=-fPIC
./configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib
make -j1 all libs
mkdir -p "$PKG"/usr/lib
make DESTDIR="$PKG" libdir=/usr/lib/ bindir=/usr/bin install
(cd "$PKG"/usr/lib/ && rm -f libPgm2asc.so && ln -s `echo libPgm2asc*.so` libPgm2asc.so)
install -D -m644 doc/gocr.html "$PKG"/usr/share/doc/gocr/gocr.html
for i in pgm2asc.h gocr.h; do
install -D -m644 src/$i "$PKG"/usr/include/gocr/$i
done
}

View File

@ -0,0 +1,25 @@
diff --git a/buildtools/manpage.mk b/buildtools/manpage.mk
index 47d890c..62e613f 100644
--- a/buildtools/manpage.mk
+++ b/buildtools/manpage.mk
@@ -251,7 +251,6 @@ MAN1 = \
ppmtolj.1 \
ppmtomap.1 \
ppmtomitsu.1 \
- ppmtompeg.1 \
ppmtoneo.1 \
ppmtopcx.1 \
ppmtopgm.1 \
diff --git a/converter/ppm/Makefile b/converter/ppm/Makefile
index 003ef8d..09f05cd 100644
--- a/converter/ppm/Makefile
+++ b/converter/ppm/Makefile
@@ -7,7 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR)
include $(BUILDDIR)/config.mk
-SUBDIRS = hpcdtoppm ppmtompeg
+SUBDIRS = hpcdtoppm
PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
leaftoppm mtvtoppm neotoppm \

View File

@ -0,0 +1,126 @@
# Tanım: Grafik resimlerin manipüle edilmesi için bir araç seti
# URL: http://netpbm.sourceforge.net/
# Paketçi: Cihan_Alkan
# Gerekler: perl libpng libtiff libxml2 python jbigkit xorg-libx11 jasper
# Grup: kütüphane
isim=netpbm
surum=10.71.02
devir=1
kaynak=(http://pkgs.fedoraproject.org/repo/pkgs/netpbm/netpbm-10.71.02.tar.xz/24df6a5baf36fa8943f046568726fd57/netpbm-10.71.02.tar.xz
netpbm-noppmtompeg.patch)
derle() {
cd $isim-$surum
touch converter/ppm/hpcdtoppm/depend.mk
patch -p1 -E --backup --verbose -i ${SRC}/netpbm-noppmtompeg.patch
# use the interactive way
CFLAGS="${CFLAGS} -fPIC"
LDSHLIB="${LDSHLIB} -fPIC"
chmod 755 configure buildtools/stamp-date buildtools/install.sh buildtools/mkinstalldirs
sed -i -e "s|\$(LDSHLIB)|\$(LDSHLIB) ${LDFLAGS}|g" lib/Makefile || exit 1
mv buildtools/pkgconfig_template buildtools/pkgconfig_template.orig
cat > buildtools/pkgconfig_template <<EOF
prefix=/usr
exec_prefix=\${prefix}
libdir=/usr/lib
includedir=\${prefix}/include
EOF
sed \
-e "s|@VERSION@|${VERSION}|g" \
-e 's|@LINKDIR@|${libdir}|g' \
-e 's|@INCLUDEDIR@|${includedir}|g' \
buildtools/pkgconfig_template.orig \
>> buildtools/pkgconfig_template || exit 1
SOVER="$(grep '^MAJ =' lib/Makefile | awk '{print $3}')"
#sed -i -e '/config_mk/d' buildtools/configure.pl
./configure <<EOF
EOF
TOP=$(pwd)
make -j1 -e \
CC=/usr/bin/gcc \
LDFLAGS="-L${TOP}/pbm -L${TOP}/pgm -L${TOP}/pnm -L${TOP}/ppm ${LDFLAGS}" \
CFLAGS="${SLKCFLAGS} -fPIC -ffast-math -pedantic -fno-common -Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef -I/usr/include/jbigkit" \
LADD="-lm" \
DEFAULT_TARGET=nonmerge \
NETPBMLIBTYPE=unixshared \
NETPBMLIBSUFFIX=so \
STATICLIB_TOO=n \
JPEGINC_DIR=/usr/include \
PNGINC_DIR=/usr/include \
TIFFINC_DIR=/usr/include \
JPEGLIB_DIR=/usr/lib \
PNGLIB_DIR=/usr/lib \
TIFFLIB_DIR=/usr/lib \
LINUXSVGALIB="NONE" \
X11LIB=/usr/lib/libX11.so \
XML2LIBS="NONE" \
JASPERLIB="" \
JASPERDEPLIBS="-ljasper" \
JBIGLIB='-ljbig' \
NETPBM_DOCURL="http://netpbm.sourceforge.net/doc/" || exit 1
# prepare man files
( cd userguide
for i in *.html ; do
../buildtools/makeman ${i}
done
for i in 1 3 5 ; do
mkdir -p man/man${i}
mv *.${i} man/man${i}
done
) || exit 1
mkdir -p ${PKG} || exit 1
make package pkgdir=${PKG}/usr LINUXSVGALIB="NONE" XML2LIBS="NONE" STATICLIB_TOO=n || exit 1
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}
if [ "/usr/lib${LIBDIRSUFFIX}" != "/usr/lib" ]; then
mv ${PKG}/usr/lib/lib* ${PKG}/usr/lib${LIBDIRSUFFIX}/ || exit 1
rmdir ${PKG}/usr/lib
fi
ln -sf libnetpbm.so.${SOVER} ${PKG}/usr/lib${LIBDIRSUFFIX}/libnetpbm.so || exit 1
find ${PKG} | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig
mv ${PKG}/usr/pkgconfig_template \
${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig/netpbm.pc || exit 1
rm -rf ${PKG}/usr/man
mkdir -p $PKG/usr/share
mv $PKG/usr/misc $PKG/usr/share/netpbm
rm -f ${PKG}/usr/config_template
rm -f ${PKG}/usr/pkginfo
rm -f ${PKG}/usr/README
rm -f ${PKG}/usr/VERSION
rm -fr ${PKG}/usr/link
}