mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
0426e5dbab
- fix bdftogd and bump PORTREVISION PR: 181250
69 lines
1.2 KiB
Plaintext
69 lines
1.2 KiB
Plaintext
--- src/bdftogd.orig 2013-06-25 11:58:23.000000000 +0200
|
|
+++ src/bdftogd 2013-08-15 21:03:29.000000000 +0200
|
|
@@ -24,6 +24,9 @@
|
|
my $filename = shift;
|
|
$filename = 'gd' . $filename unless $filename =~ /^gd/i;
|
|
|
|
+my $gdfunc = $gdname;
|
|
+$gdfunc =~ s/(.*Font)(.*)/$1Get$2/;
|
|
+
|
|
if (-f "$filename.c") { die "File $filename.c already exists, won't overwrite\n"; }
|
|
if (-f "$filename.h") { die "File $filename.h already exists, won't overwrite\n"; }
|
|
|
|
@@ -139,6 +142,10 @@
|
|
|
|
$info
|
|
|
|
+#ifdef HAVE_CONFIG_H
|
|
+#include "config.h"
|
|
+#endif
|
|
+
|
|
#include "$filename.h"
|
|
|
|
char ${gdname}Data[] = {
|
|
@@ -177,28 +184,40 @@
|
|
${gdname}Data
|
|
};
|
|
|
|
-gdFontPtr ${gdname} = &${gdname}Rep;
|
|
+BGD_EXPORT_DATA_PROT gdFontPtr ${gdname} = &${gdname}Rep;
|
|
|
|
-/* This file has not been truncated. */
|
|
+BGD_DECLARE(gdFontPtr)
|
|
+$gdfunc (void)
|
|
+{
|
|
+ return $gdname;
|
|
+}
|
|
|
|
+/* This file has not been truncated. */
|
|
EOF
|
|
|
|
|
|
close FILEC;
|
|
|
|
print FILEH <<"EOF";
|
|
-
|
|
#ifndef $capdef
|
|
#define $capdef 1
|
|
|
|
+#ifdef __cplusplus
|
|
+extern "C" {
|
|
+#endif
|
|
+
|
|
$info
|
|
|
|
#include "gd.h"
|
|
|
|
-extern gdFontPtr $gdname;
|
|
+extern BGD_EXPORT_DATA_PROT gdFontPtr $gdname;
|
|
+BGD_DECLARE(gdFontPtr) $gdfunc(void);
|
|
|
|
+#ifdef __cplusplus
|
|
+}
|
|
#endif
|
|
|
|
+#endif
|
|
EOF
|
|
|
|
1;
|