push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
diff --git a/Makefile b/Makefile
index e65b64c..52af5ed 100644
--- a/Makefile
+++ b/Makefile
@@ -41,8 +41,9 @@ all: ttmkfdir
.cpp.o:
libtool --mode=compile $(CXX) $(CXXFLAGS) -o $@ -c $^
+# ulgy hack for libtool to find .o files !!
ttmkfdir: ttmkfdir.o directory.o commandline.o ttf.o encoding.o parser.o builtin.o
- libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
+ libtool --mode=link $(CXX) -o $@ ./.libs/ttmkfdir.o ./.libs/directory.o ./.libs/commandline.o ./.libs/ttf.o ./.libs/encoding.o ./.libs/parser.o ./.libs/builtin.o $(LDFLAGS)
parser.cpp: encoding.l
flex -i -8 -o$@ $<
diff --git a/encoding.cpp b/encoding.cpp
index 9035d35..b4e9733 100644
--- a/encoding.cpp
+++ b/encoding.cpp
@@ -2,7 +2,9 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
-#include "freetype/freetype.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include <freetype/ftsnames.h>
#include "ttmkfdir.h"
#include "encoding.h"
diff --git a/encoding.h b/encoding.h
index fc618bc..e01518f 100644
--- a/encoding.h
+++ b/encoding.h
@@ -6,7 +6,8 @@
#include <map>
#include <string>
-#include "freetype/freetype.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
#include "util.h"
diff --git a/ttf.cpp b/ttf.cpp
index 1dda774..97b37f3 100644
--- a/ttf.cpp
+++ b/ttf.cpp
@@ -239,7 +239,7 @@ Face::FontFamilyName (void) const
for (i = 0; i < n; i++) {
if ((fterror = FT_Get_Sfnt_Name (face, i, &NamePtr)) != FT_Err_Ok) {
std::cout << "Warning: Can't SFNT name : " << FileName << "(" << fterror << ")" << std::endl;
- return;
+ return 0;
};
platform = NamePtr.platform_id;
encoding = NamePtr.encoding_id;
diff --git a/ttf.h b/ttf.h
index 4261ef8..c4a0f1f 100644
--- a/ttf.h
+++ b/ttf.h
@@ -3,13 +3,14 @@
#define TTF_H__
#include <string>
+#include <ft2build.h>
+#include FT_FREETYPE_H
#include "freetype/freetype.h"
#include "freetype/tttables.h"
#include "freetype/ftsnames.h"
#include "freetype/ttnameid.h"
#include "freetype/fterrors.h"
-#include "freetype/ftmodule.h"
-
+#include "freetype/ftmodapi.h"
#include "util.h"
#include "encoding.h"

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchurl,
freetype,
libtool,
flex,
bison,
pkg-config,
}:
stdenv.mkDerivation {
pname = "ttf-mkfontdir";
version = "3.0.9-6";
src = fetchurl {
url = "http://mirror.fsf.org/trisquel/pool/main/t/ttmkfdir/ttmkfdir_3.0.9.orig.tar.gz";
sha256 = "0n6bmmndmp4c1myisvv7cby559gzgvwsw4rfw065a3f92m87jxiq";
};
# all the patches up from ttmkfdir-3.0.9/Makefile should be reviewed by someone
# who knows more about C/C++ ..
patches = [
(fetchurl {
url = "http://mirror.fsf.org/trisquel/pool/main/t/ttmkfdir/ttmkfdir_3.0.9-6.diff.gz";
sha256 = "141kxaf2by8nf87hqyszaxi0n7nnmswr1nh2i5r5bsvxxmaj9633";
})
./cstring.patch # also fixes some other compilation issues (freetype includes)
];
# cross-compilation fixes:
# - fix libtool, the reason it does not work in nativeBuildInputs is complicated
# see https://github.com/NixOS/nixpkgs/pull/192878 for more info
# - freetype-config doesn't properly support cross-compilation, but is just a thin
# wrapper around pkg-config anyways
postPatch = ''
substituteInPlace Makefile \
--replace "libtool " "${libtool}/bin/libtool --tag=CXX " \
--replace "freetype-config" "${stdenv.cc.targetPrefix}pkg-config freetype2"
'';
makeFlags = [
"DESTDIR=${placeholder "out"}"
"BINDIR=/bin"
"CXX=${stdenv.cc.targetPrefix}c++"
];
nativeBuildInputs = [
flex
bison
pkg-config
];
buildInputs = [ freetype ];
meta = {
description = "Create fonts.dir for TTF font directory";
platforms = lib.platforms.linux;
mainProgram = "ttmkfdir";
};
}