ftgl: fix build, clean up

- patch to fix type mismatch error
- remove conditional Darwin inputs, those are aliased in all-packages.nix now
- clean up postInstall
- remove unnecessary enableParallelBuilding

K900 66eee3ad 6471602f

+44 -16
+39
pkgs/by-name/ft/ftgl/fix-warnings.patch
··· 1 + diff --git a/src/FTContour.cpp b/src/FTContour.cpp 2 + index c668d32..ef13576 100644 3 + --- a/src/FTContour.cpp 4 + +++ b/src/FTContour.cpp 5 + @@ -174,7 +174,7 @@ void FTContour::SetParity(int parity) 6 + } 7 + 8 + 9 + -FTContour::FTContour(FT_Vector* contour, char* tags, unsigned int n) 10 + +FTContour::FTContour(FT_Vector* contour, unsigned char* tags, unsigned int n) 11 + { 12 + FTPoint prev, cur(contour[(n - 1) % n]), next(contour[0]); 13 + double olddir, dir = atan2((next - cur).Y(), (next - cur).X()); 14 + diff --git a/src/FTContour.h b/src/FTContour.h 15 + index d2d187c..dc64e3a 100644 16 + --- a/src/FTContour.h 17 + +++ b/src/FTContour.h 18 + @@ -52,7 +52,7 @@ class FTContour 19 + * @param pointTags 20 + * @param numberOfPoints 21 + */ 22 + - FTContour(FT_Vector* contour, char* pointTags, unsigned int numberOfPoints); 23 + + FTContour(FT_Vector* contour, unsigned char* pointTags, unsigned int numberOfPoints); 24 + 25 + /** 26 + * Destructor 27 + diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp 28 + index 26e7da8..53d738e 100644 29 + --- a/src/FTVectoriser.cpp 30 + +++ b/src/FTVectoriser.cpp 31 + @@ -168,7 +168,7 @@ void FTVectoriser::ProcessContours() 32 + for(int i = 0; i < ftContourCount; ++i) 33 + { 34 + FT_Vector* pointList = &outline.points[startIndex]; 35 + - char* tagList = &outline.tags[startIndex]; 36 + + unsigned char* tagList = &outline.tags[startIndex]; 37 + 38 + endIndex = outline.contours[i]; 39 + contourLength = (endIndex - startIndex) + 1;
+5 -16
pkgs/by-name/ft/ftgl/package.nix
··· 8 8 , libGL 9 9 , libGLU 10 10 , pkg-config 11 - , darwin 12 11 }: 13 12 14 - let 15 - inherit (darwin.apple_sdk.frameworks) OpenGL GLUT; 16 - in 17 13 stdenv.mkDerivation rec { 18 14 pname = "ftgl"; 19 15 version = "2.4.0"; ··· 33 29 --replace ' -dylib_file $GL_DYLIB: $GL_DYLIB' "" 34 30 ''; 35 31 32 + patches = [ 33 + ./fix-warnings.patch 34 + ]; 35 + 36 36 nativeBuildInputs = [ 37 37 autoreconfHook 38 38 doxygen ··· 40 40 ]; 41 41 buildInputs = [ 42 42 freetype 43 - ] ++ (if stdenv.hostPlatform.isDarwin then [ 44 - OpenGL 45 - GLUT 46 - ] else [ 47 43 libGL 48 44 libGLU 49 45 libglut 50 - ]); 51 - 52 - configureFlags = [ 53 - "--with-ft-prefix=${lib.getDev freetype}" 54 46 ]; 55 47 56 - enableParallelBuilding = true; 57 - 58 48 postInstall = '' 59 - install -Dm644 src/FTSize.h -t ${placeholder "out"}/include/FTGL 60 - install -Dm644 src/FTFace.h -t ${placeholder "out"}/include/FTGL 49 + install -Dm644 src/FTSize.h src/FTFace.h -t $out/include/FTGL 61 50 ''; 62 51 63 52 meta = with lib; {