51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
#
|
|
# partly based on freeimage-3.15.4.ebuild from Gentoo, which has Copyright:
|
|
# Copyright 1999-2015 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
MY_PN=FreeImage
|
|
MY_P=${MY_PN}${PV//.}
|
|
|
|
DESCRIPTION="Image library supporting many formats"
|
|
HOMEPAGE="http://freeimage.sourceforge.net/"
|
|
DOWNLOADS="mirror://sourceforge/${PN}/${MY_P}.zip"
|
|
|
|
LICENCES="|| ( GPL-2 FIPL-1.0 )"
|
|
SLOT="0"
|
|
PLATFORMS="~amd64 ~x86"
|
|
|
|
DEPENDENCIES="
|
|
build:
|
|
virtual/unzip
|
|
"
|
|
|
|
WORK=${WORKBASE}/${MY_PN}
|
|
|
|
DEFAULT_SRC_PREPARE_PATCHES=(
|
|
-p1 "${FILES}"/${PNV}-gcc-5.diff
|
|
)
|
|
|
|
src_prepare() {
|
|
edo sed -i 's/\r$//' -- \
|
|
"${WORKBASE}"/FreeImage/Source/LibWebP/src/dsp/*
|
|
default
|
|
edo cp -r "${WORKBASE}"/FreeImage "${WORKBASE}"/FreeImagefip
|
|
}
|
|
|
|
foreach_make() {
|
|
edo emake -C "${WORKBASE}"/FreeImage -f Makefile.gnu "$@"
|
|
edo emake -C "${WORKBASE}"/FreeImagefip -f Makefile.fip "$@"
|
|
}
|
|
|
|
src_compile() {
|
|
foreach_make
|
|
}
|
|
|
|
src_install() {
|
|
foreach_make install DESTDIR="${IMAGE}" \
|
|
INCDIR="${IMAGE}"/usr/$(exhost --target)/include \
|
|
INSTALLDIR="${IMAGE}"/usr/$(exhost --target)/lib
|
|
}
|