pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/print/advi
Module Name: pkgsrc
Committed By: dholland
Date: Mon Dec 27 00:49:02 UTC 2021
Modified Files:
pkgsrc/print/advi: Makefile distinfo
pkgsrc/print/advi/patches: patch-src_Makefile.in
Added Files:
pkgsrc/print/advi/patches: patch-src_drawimage.ml patch-src_dvi.ml
patch-src_glyph.ml patch-src_grdev.ml patch-src_gterm.ml
patch-src_input.ml patch-src_pkfont.ml patch-src_ttfont.ml
Log Message:
Make print/advi build again.
To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 pkgsrc/print/advi/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/print/advi/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/print/advi/patches/patch-src_Makefile.in
cvs rdiff -u -r0 -r1.1 pkgsrc/print/advi/patches/patch-src_drawimage.ml \
pkgsrc/print/advi/patches/patch-src_dvi.ml \
pkgsrc/print/advi/patches/patch-src_glyph.ml \
pkgsrc/print/advi/patches/patch-src_grdev.ml \
pkgsrc/print/advi/patches/patch-src_gterm.ml \
pkgsrc/print/advi/patches/patch-src_input.ml \
pkgsrc/print/advi/patches/patch-src_pkfont.ml \
pkgsrc/print/advi/patches/patch-src_ttfont.ml
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/print/advi/Makefile
diff -u pkgsrc/print/advi/Makefile:1.137 pkgsrc/print/advi/Makefile:1.138
--- pkgsrc/print/advi/Makefile:1.137 Wed Dec 8 16:06:11 2021
+++ pkgsrc/print/advi/Makefile Mon Dec 27 00:49:02 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.137 2021/12/08 16:06:11 adam Exp $
+# $NetBSD: Makefile,v 1.138 2021/12/27 00:49:02 dholland Exp $
DISTNAME= advi-1.10.2
PKGREVISION= 53
@@ -30,6 +30,14 @@ USE_TOOLS+= gmake gs:run
GNU_CONFIGURE_LIBDIR= ${PREFIX}/share/texmf-dist
CONFIGURE_ARGS+= --with-gs=${PREFIX}/bin/gs
+GRAPHICS_PREFIX= ${BUILDLINK_PREFIX.ocaml-graphics}
+GRAPHICS_DIR= ${GRAPHICS_PREFIX}/lib/ocaml/site-lib/graphics
+MAKE_ENV+= OCAMLGRAPHICS_INCLUDES=-I\ ${GRAPHICS_DIR}
+# For reasons best known to itself the preexisting makefiles already include
+# the library but not the includes.
+#MAKE_ENV+= OCAMLGRAPHICS_LIBS_BYTE=${GRAPHICS_DIR}/graphics.cma
+#MAKE_ENV+= OCAMLGRAPHICS_LIBS_NATIVE=${GRAPHICS_DIR}/graphics.cmxa
+
INSTALL_UNSTRIPPED= yes
SUBST_CLASSES+= gs
Index: pkgsrc/print/advi/distinfo
diff -u pkgsrc/print/advi/distinfo:1.13 pkgsrc/print/advi/distinfo:1.14
--- pkgsrc/print/advi/distinfo:1.13 Tue Oct 26 11:12:02 2021
+++ pkgsrc/print/advi/distinfo Mon Dec 27 00:49:02 2021
@@ -1,7 +1,15 @@
-$NetBSD: distinfo,v 1.13 2021/10/26 11:12:02 nia Exp $
+$NetBSD: distinfo,v 1.14 2021/12/27 00:49:02 dholland Exp $
BLAKE2s (advi-1.10.2.tar.gz) = 93641026540c5820f9ecc94b7874dd8353a1ecbf9cae162d35fae561a483622f
SHA512 (advi-1.10.2.tar.gz) = 93479e22261019b571bc331604a659e4e58200284bcdd63929b2c7ab07f8e9fabbd120f8876081a36e7e09e08286eeba9a45f3b077b545a9e404060622ec45c8
Size (advi-1.10.2.tar.gz) = 9772060 bytes
SHA1 (patch-doc_pngs_Makefile.in) = 3141938a6433d4dab8d7247ae89ad3381d902372
-SHA1 (patch-src_Makefile.in) = 3f9be7ac0c4a98b3e36c383ed2489b0d71e73f8a
+SHA1 (patch-src_Makefile.in) = 57c725715075697b12d61df2aaf598c8964f2e37
+SHA1 (patch-src_drawimage.ml) = edbb86f69f034d6b5f1d4dba936c74a51a1c7e0a
+SHA1 (patch-src_dvi.ml) = 2adfe109dcdbc5d8449d318e500015bb8a87cdf6
+SHA1 (patch-src_glyph.ml) = 186993579b52da03944be40f86ce87990d5eefc4
+SHA1 (patch-src_grdev.ml) = 96eb2c162a9aa8e4bb36a2c93cdc20d385dbf98f
+SHA1 (patch-src_gterm.ml) = 514f5bf9fc3ea1579a6e990f998e8536af85b1b7
+SHA1 (patch-src_input.ml) = 2b896cfb700cb63fcf1688116a43492e81fd09e8
+SHA1 (patch-src_pkfont.ml) = dcdb0aaaee33acbc1ab40a4f92d8a8e7c376058c
+SHA1 (patch-src_ttfont.ml) = e15a108630f690dac092751b7850686510e5cf6b
Index: pkgsrc/print/advi/patches/patch-src_Makefile.in
diff -u pkgsrc/print/advi/patches/patch-src_Makefile.in:1.3 pkgsrc/print/advi/patches/patch-src_Makefile.in:1.4
--- pkgsrc/print/advi/patches/patch-src_Makefile.in:1.3 Sat Jan 24 03:55:34 2015
+++ pkgsrc/print/advi/patches/patch-src_Makefile.in Mon Dec 27 00:49:02 2021
@@ -1,10 +1,27 @@
-$NetBSD: patch-src_Makefile.in,v 1.3 2015/01/24 03:55:34 mef Exp $
+$NetBSD: patch-src_Makefile.in,v 1.4 2021/12/27 00:49:02 dholland Exp $
-Fix build with modular Xorg.1.2
+Fix build with modular Xorg.1.2 (link with X_LIBS and honor LDFLAGS)
---- src/Makefile.in.orig 2011-08-07 14:43:38.000000000 +0000
-+++ src/Makefile.in 2011-08-07 14:44:05.000000000 +0000
-@@ -624,7 +624,7 @@
+Hack ocaml-graphics paths into the build. The makefiles date from when
+it was part of the ocaml stdlib.
+
+--- src/Makefile.in.orig 2011-09-27 07:45:41.000000000 +0000
++++ src/Makefile.in
+@@ -292,10 +292,10 @@ OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.
+ OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx)
+ COBJS = $(CSOURCES:.c=.o)
+ AM_CFLAGS = $(XINERAMA_CFLAGS) $(X_CFLAGS)
+-AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES)
++AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) $(OCAMLGRAPHICS_INCLUDES)
+ OTHER_LIBS = unix str
+-OCAMLLIBS_OPT = $(CAMLIMAGES_LIBS_NATIVE) $(OTHER_LIBS:=.cmxa)
+-OCAMLLIBS_BYT = $(CAMLIMAGES_LIBS_BYTE) $(OTHER_LIBS:=.cma)
++OCAMLLIBS_OPT = $(CAMLIMAGES_LIBS_NATIVE) $(OCAMLGRAHPICS_LIBS_NATIVE) $(OTHER_LIBS:=.cmxa)
++OCAMLLIBS_BYT = $(CAMLIMAGES_LIBS_BYTE) $(OCAMLGRAPHICS_LIBS_BYTE) $(OTHER_LIBS:=.cma)
+
+ # In bytecode mode create stubcode in dlladvi
+ DLLADVI = dlladvi.so
+@@ -624,7 +624,7 @@ dlladvi.so: $(COBJS) Makefile
$(OCAMLMKLIB) -o advi \
$(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) $(AM_LINKFLAGS) \
$(COBJS) \
Added files:
Index: pkgsrc/print/advi/patches/patch-src_drawimage.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_drawimage.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_drawimage.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_drawimage.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/drawimage.ml~ 2007-01-18 14:14:35.000000000 +0000
++++ src/drawimage.ml
+@@ -161,10 +161,20 @@ let after f g = try let x = f () in g (
+
+ let cache_path file whitetransp psbbox ratiopt antialias (w, h) =
+ let file' = Userfile.fullpath (Unix.getcwd ()) file in
++(*
+ let file' = if file == file' then String.copy file' else file' in
+ for i = 0 to String.length file' - 1 do
+ if file'.[i] = '/' then file'.[i] <- '-'
+ done;
++*)
++ let file' =
++ let f i =
++ match String.get file' i with
++ | '/' -> '-'
++ | c -> c
++ in
++ String.init (String.length file') f
++ in
+ let geom_string x =
+ if x >= 0 then "+" ^ string_of_int x else string_of_int x
+ in
+@@ -206,9 +216,9 @@ let cache_path file whitetransp psbbox r
+ let cache_load file =
+ debugs ("cache_load " ^ file);
+ let load ic =
+- let s = String.create (String.length cache_key) in
++ let s = Bytes.create (String.length cache_key) in
+ ignore (input ic s 0 (String.length cache_key));
+- if s <> cache_key then failwith (file ^ " has no proper header");
++ if Bytes.to_string s <> cache_key then failwith (file ^ " has no proper header");
+ let rgba = input_value ic in (* bool *)
+ let width = input_value ic in
+ let height = input_value ic in
+@@ -237,7 +247,7 @@ let cache_load file =
+ let cache_save file img =
+ debugs ("cache_save " ^ file);
+ let save oc =
+- output oc cache_key 0 (String.length cache_key);
++ output oc (Bytes.of_string cache_key) 0 (String.length cache_key);
+ match img with
+ | Rgba32 image ->
+ output_value oc true;
Index: pkgsrc/print/advi/patches/patch-src_dvi.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_dvi.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_dvi.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_dvi.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/dvi.ml~ 2010-04-05 08:15:06.000000000 +0000
++++ src/dvi.ml
+@@ -363,9 +363,9 @@ let input_int32 =
+ | _ -> assert false;;
+
+ let input_string ch len =
+- let str = String.create len in
++ let str = Bytes.create len in
+ really_input ch str 0 len ;
+- str;;
++ Bytes.to_string str;;
+
+ (*** Parsing commands ***)
+
Index: pkgsrc/print/advi/patches/patch-src_glyph.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_glyph.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_glyph.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_glyph.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/glyph.ml~ 2007-01-18 14:14:36.000000000 +0000
++++ src/glyph.ml
+@@ -61,7 +61,7 @@ let from_char_def cdef ratio =
+ and hot_row = cdef.Font.voffset in
+ let (ncols', hot_col', col_table) = make_table ncols hot_col ratio
+ and (nrows', hot_row', row_table) = make_table nrows hot_row ratio in
+- let graymap = String.create (ncols' * nrows')
++ let graymap = Bytes.create (ncols' * nrows')
+ and index = ref 0
+ and fact = 256.0 *. ratio *. ratio
+ and last_col = ncols - 1
+@@ -92,7 +92,7 @@ let from_char_def cdef ratio =
+ done
+ done ;
+ let gray = Misc.round (!sum *. fact) in
+- graymap.[!index] <- Char.chr (max 0 (min gray 255)) ;
++ Bytes.set graymap !index (Char.chr (max 0 (min gray 255))) ;
+ incr index
+ done
+ done ;
+@@ -100,4 +100,4 @@ let from_char_def cdef ratio =
+ height = nrows' ;
+ hoffset = hot_col' ;
+ voffset = hot_row' ;
+- graymap = graymap } ;;
++ graymap = Bytes.to_string graymap } ;;
Index: pkgsrc/print/advi/patches/patch-src_grdev.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_grdev.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_grdev.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_grdev.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/grdev.ml~ 2011-08-05 08:24:17.000000000 +0000
++++ src/grdev.ml
+@@ -169,12 +169,12 @@ let inputp fdins =
+ | _, _, _ -> true
+
+ let get_input () =
+- let buf = String.create 1 in
++ let buf = Bytes.create 1 in
+ if inputp [ Unix.stdin ] then
+ let _ = Unix.read Unix.stdin buf 0 1 in
+ if inputp [ Unix.stdin ] then ()
+ else clear_usr2();
+- buf.[0]
++ Bytes.get buf 0
+ else assert false;;
+
+ let watch_file_check () =
Index: pkgsrc/print/advi/patches/patch-src_gterm.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_gterm.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_gterm.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_gterm.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/gterm.ml~ 2007-01-18 14:14:36.000000000 +0000
++++ src/gterm.ml
+@@ -28,7 +28,7 @@ type rectangle = GraphicsY11.rectangle =
+
+ type term = {
+ (* Character contents of the terminal. *)
+- mutable lines : string array;
++ mutable lines : Bytes.t array;
+ (* Height in lines. *)
+ mutable height : int;
+ (* Width in characters. *)
+@@ -71,7 +71,7 @@ let draw_cursor t cc cf =
+ let gx = cursor_gx t
+ and gy = cursor_gy t in
+ Graphics.fill_rect gx gy t.font_size_x t.font_size_y;
+- let c = t.lines.(t.cursor_y).[t.cursor_x] in
++ let c = Bytes.get t.lines.(t.cursor_y) t.cursor_x in
+ Graphics.moveto gx gy;
+ Graphics.set_color cf;
+ Graphics.draw_char c;
+@@ -147,7 +147,7 @@ let redraw t =
+ Array.iteri
+ (fun i s ->
+ Graphics.moveto t.gx (t.gy + t.font_size_y * i);
+- Graphics.draw_string s)
++ Graphics.draw_string (Bytes.to_string s)) (* XXX: slow? *)
+ t.lines;
+ show_cursor t;;
+
+@@ -156,7 +156,7 @@ let clear t =
+ Graphics.fill_rect
+ t.gx t.gy (t.width * t.font_size_x) (t.height * t.font_size_y);
+ Graphics.set_color t.foreground_color;
+- Array.iter (fun s -> String.fill s 0 (String.length s) ' ') t.lines;
++ Array.iter (fun s -> Bytes.fill s 0 (Bytes.length s) ' ') t.lines;
+ htab t 0;
+ vtab t (t.height - 1);;
+
+@@ -223,7 +223,7 @@ let make_term_gen fg bg bw bwc tc cc xc
+ if h < 1 || w < 1 || bw < 0 then failwith "make_term_gen" else
+ let font_size_x, font_size_y = Graphics.text_size "M" in
+ let t = {
+- lines = Array.init h (fun i -> String.make w ' ');
++ lines = Array.init h (fun i -> Bytes.make w ' ');
+ height = h;
+ width = w;
+ gheight = h * font_size_y;
+@@ -305,7 +305,7 @@ let make_term =
+ (* Basic functions to edit. *)
+ let end_of_line t =
+ let line = t.lines.(t.cursor_y) in
+- let l = String.length line in
++ let l = Bytes.length line in
+ htab t l;;
+
+ let beginning_of_line t = htab t 0;;
Index: pkgsrc/print/advi/patches/patch-src_input.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_input.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_input.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_input.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/input.ml~ 2007-01-18 14:14:36.000000000 +0000
++++ src/input.ml
+@@ -84,9 +84,9 @@ let input_int32 =
+ (Printf.sprintf "Pkfont: cannot work on a %d-bit architecture" size) ;;
+
+ let input_string ch n =
+- let str = String.create n in
++ let str = Bytes.create n in
+ really_input ch str 0 n ;
+- str ;;
++ Bytes.to_string str ;;
+
+ let skip_bytes ch n =
+ seek_in ch (pos_in ch + n) ;;
Index: pkgsrc/print/advi/patches/patch-src_pkfont.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_pkfont.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_pkfont.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,41 @@
+$NetBSD: patch-src_pkfont.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/pkfont.ml~ 2007-01-18 14:14:36.000000000 +0000
++++ src/pkfont.ml
+@@ -237,7 +237,7 @@ let unpack cdef =
+ and h = cdef.height in
+ let size = w * h in
+ let datalen = (size + 7) lsr 3 in
+- let data = String.make datalen '\000'
++ let data = Bytes.make datalen '\000'
+ (* Index into the bitmap *)
+ and i = ref 0 and imask = ref 0x80
+ (* Index into the bitmap, [w] bits before *)
+@@ -246,7 +246,7 @@ let unpack cdef =
+ (* Sending a bit to the bitmap *)
+ let send_bit b =
+ if b then
+- data.[!i] <- Char.chr (Char.code data.[!i] lor !imask) ;
++ Bytes.set data !i (Char.chr (Char.code (Bytes.get data !i) lor !imask)) ;
+ imask := !imask lsr 1 ;
+ if !imask = 0 then begin imask := 0x80 ; incr i end ;
+ jmask := !jmask lsr 1 ;
+@@ -254,8 +254,8 @@ let unpack cdef =
+ (* Resending n times the last line to the bitmap *)
+ let resend_last_line n =
+ for p = 1 to n * w do
+- if Char.code data.[!j] land !jmask <> 0 then
+- data.[!i] <- Char.chr (Char.code data.[!i] lor !imask) ;
++ if Char.code (Bytes.get data !j) land !jmask <> 0 then
++ Bytes.set data !i (Char.chr (Char.code (Bytes.get data !i) lor !imask)) ;
+ imask := !imask lsr 1 ;
+ if !imask = 0 then begin imask := 0x80 ; incr i end ;
+ jmask := !jmask lsr 1 ;
+@@ -295,4 +295,4 @@ let unpack cdef =
+ black := not !black
+ end
+ done ;
+- cdef.bitmap <- Unpacked data ;;
++ cdef.bitmap <- Unpacked (Bytes.to_string data) ;;
Index: pkgsrc/print/advi/patches/patch-src_ttfont.ml
diff -u /dev/null pkgsrc/print/advi/patches/patch-src_ttfont.ml:1.1
--- /dev/null Mon Dec 27 00:49:02 2021
+++ pkgsrc/print/advi/patches/patch-src_ttfont.ml Mon Dec 27 00:49:02 2021
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_ttfont.ml,v 1.1 2021/12/27 00:49:02 dholland Exp $
+
+Hack up the code for immutable strings.
+
+--- src/ttfont.ml~ 2010-08-18 10:05:40.000000000 +0000
++++ src/ttfont.ml
+@@ -57,7 +57,7 @@ let build face dpi pt unicode =
+ let width = bitmapinfo.bitmap_width in
+ let height = bitmapinfo.bitmap_height in
+ let bitmap_len = (width * height + 7) / 8 in
+- let bitmap = String.create bitmap_len in
++ let bitmap = Bytes.create bitmap_len in
+ let is_black pos =
+ let x = pos mod width in
+ let y = pos / width in
+@@ -72,7 +72,7 @@ let build face dpi pt unicode =
+ if is_black !pos then char := !char lor 0x01;
+ incr pos
+ done;
+- bitmap.[i] <- char_of_int !char
++ Bytes.set bitmap i (char_of_int !char)
+ done;
+
+ { code= unicode;
+@@ -82,7 +82,7 @@ let build face dpi pt unicode =
+ height= height;
+ hoffset= -bitmapinfo.bitmap_left;
+ voffset= bitmapinfo.bitmap_top;
+- bitmap= bitmap
++ bitmap= Bytes.to_string bitmap
+ }
+ ;;
+
Home |
Main Index |
Thread Index |
Old Index