libjpeg: modernize

This commit is contained in:
Sandro Jäckel 2021-07-26 01:36:30 +02:00
parent 8c90a87418
commit 6f8845d30d
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 10 additions and 35 deletions

View file

@ -1,25 +0,0 @@
source $stdenv/setup
preConfigure() {
# Workarounds for the ancient libtool shipped by libjpeg.
ln -s $libtool/bin/libtool .
cp $libtool/share/libtool/config.guess .
cp $libtool/share/libtool/config.sub .
}
preInstall() {
mkdir $out
mkdir $out/bin
mkdir $out/lib
mkdir $out/include
mkdir $out/man
mkdir $out/man/man1
}
patchPhase() {
for i in $patches; do
patch < $i
done
}
genericBuild

View file

@ -1,23 +1,23 @@
{ lib, stdenv, fetchurl, static ? false }:
with lib;
stdenv.mkDerivation {
name = "libjpeg-9d";
stdenv.mkDerivation rec {
pname = "libjpeg";
version = "9d";
src = fetchurl {
url = "http://www.ijg.org/files/jpegsrc.v9d.tar.gz";
url = "http://www.ijg.org/files/jpegsrc.v${version}.tar.gz";
sha256 = "1vkip9rz4hz8f31a2kl7wl7f772wg1z0fg1fbd1653wzwlxllhvc";
};
configureFlags = optional static "--enable-static --disable-shared";
configureFlags = lib.optional static "--enable-static --disable-shared";
outputs = [ "bin" "dev" "out" "man" ];
meta = {
homepage = "http://www.ijg.org/";
meta = with lib; {
homepage = "https://www.ijg.org/";
description = "A library that implements the JPEG image file format";
license = lib.licenses.free;
platforms = lib.platforms.unix;
maintainers = with maintainers; [ ];
license = licenses.free;
platforms = platforms.unix;
};
}