Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
50ea4f6ce2
!6 Update to 8.06.13
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-05-15 10:11:04 +00:00
lyn1001
d61f12501c Update to 8.06.13 2023-05-15 17:39:17 +08:00
openeuler-ci-bot
ae2238e075
!5 update to 8.06.11
From: @wk333 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-04-18 08:26:46 +00:00
wk333
edd1e36087 update to 8.06.11 2022-04-15 18:24:40 +08:00
openeuler-ci-bot
4f538f5c6d !3 修复安全编译的sp选项
From: @gongzt
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-09-10 02:23:09 +00:00
gongzt
56c26e8f8f Fix SP security options 2021-09-09 20:35:29 +08:00
openeuler-ci-bot
39ffa738a1 !2 增加 changelog文件、更新README.en文件。
From: @xielhxie
Reviewed-by: @licihua
Signed-off-by: @licihua
2020-11-02 15:42:13 +08:00
xielh
c7de445163 add changelog 2020-10-28 16:39:56 +08:00
xielh
4f1de63fb9 update README.en.md. 2020-10-28 16:36:44 +08:00
openeuler-ci-bot
8dad91096a !1 package init
From: @maminjie
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-10-21 15:58:43 +08:00
maminjie
19a6b27d7b package init 2020-10-21 15:47:44 +08:00
8 changed files with 330 additions and 1 deletions

View File

@ -1,7 +1,15 @@
# labltk # labltk
#### Description #### Description
Tcl/Tk interface for OCaml LablTk is an OCaml interface to the Tcl/Tk GUI framework.
It allows to develop GUI applications in a speedy and type safe way.
It was derived from the CamlTk project, and a legacy CamlTk API is included.
The OCamlBrowser library viewer is also part ofthis project.
LablTk provides a strongly-typed, yet comfortable, interface to Tcl/Tk's widgets through OCaml's rich type system.
Most widgets and methods are available, along with many examples.
The toplevel can be used for interactive development.
#### Software Architecture #### Software Architecture
Software architecture description Software architecture description

12
add_sp.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nur labltk-labltk-8.06.4/support/Makefile labltk.new/support/Makefile
--- labltk-labltk-8.06.4/support/Makefile 2017-10-30 17:17:52.000000000 +0800
+++ labltk.new/support/Makefile 2021-09-09 17:19:14.856798739 +0800
@@ -28,7 +28,7 @@
cltkFile.$(O) cltkMain.$(O) cltkMisc.$(O) cltkTimer.$(O) \
cltkVar.$(O) cltkWait.$(O) cltkImg.$(O)
-CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g
+CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g ${RPM_OPT_FLAGS}
COMPFLAGS=-I +unix
THFLAGS=-I +threads -I vmthreads

131
changelog Normal file
View File

@ -0,0 +1,131 @@
2020-08-25:
-----------
* Release labltk-8.06.9 for ocaml 4.11
* search for X11 headers in /usr/local/include if needed (freebsd)
2020-08-24:
-----------
* fix config/auto-aux/hasgot for clang 12 (MacOS)
* update ocamlbrowser to ocaml 4.11
2020-01-13:
-----------
* Release labltk-8.06.8 for ocaml 4.10
* update ocamlbrowser to ocaml 4.10
* fix again file selection
2019-11-20:
-----------
* fix filtering in file selection (OCamlBrowser)
* lookup source files for Stdlib__* (OCamlBrowser)
2019-09-23:
-----------
* Release labltk-8.06.7 for ocaml 4.09
* ocaml 4.08/4.09 compatibility: use OCAMLC_CFLAGS and Stdlib
* include auxlib-in-META
* default to -tk-no-x11 in configure (new -tk-x11 option available)
* add fallback to -I/usr/X11/include and -L/usr/X11/lib
2019-05-31:
-----------
* Release labltk-8.06.6 for ocaml 4.08
* Have configure use (GNU) make rather than grep to read
ocaml/Makefile.config, due to change in ocaml 4.08
* Add "library" target, to avoid compiling ocamlbrowser
* Update ocamlbrowser for ocaml 4.08
2018-12-20:
-----------
* Fix browser for module aliases and polymorphic variants
2018-07-11:
-----------
* Release labltk-8.06.5, for ocaml 4.07
2018-06-26:
-----------
* Update browser for ocaml 4.07
2017-10-30:
-----------
* Release labltk-8.06.4, for ocaml 4.06
2017-09-19:
-----------
* prepare for 4.06: -safe-string transition and browser updates
2017-07-19:
-----------
* Release labltk-8.06.3, for ocaml 4.05
* Various fixes for ocaml 4.05 (merge debian patches by Stephane Glondu)
2017-05-15:
-----------
* Fix configuration and Makefile for OCaml 4.06
2016-08-13:
-----------
* suppress gcc warning about unused variable (Damien Doligez)
2016-08-10:
-----------
* Release labltk-8.06.2, for ocaml 4.04
2016-08-02:
-----------
* update browser for 4.04
2016-04-28:
-----------
* Fix warning 52
2016-04-27:
-----------
* Release labltk-8.06.1
* Adapt to ocaml 4.03
* Fix const qualifiers in C code
2014-12-22:
-----------
* Adapt to changes in trunk
2014-09-18:
-----------
* Release labltk-8.06.0
* Improve configuration, and allow using findlib for installation
* Fix PR#1423: Tkvars.version() call gives Fatal error
* Fix PR#1411: some void-returning functions are wrongly declared with CAMLprim
* Fix PR#1412: wrong declaration for argument of camltk_tk_mainloop
2014-08-21:
-----------
* Add command line flags in ocamlbrowser for -safe-string and -short-paths.
2014-05-22:
-----------
* Update for 4.02.
2013-12-17:
-----------
* Add INSTALL file.
* Update for ocaml trunk.
* Modify tkcompiler to allow widgets with name containing special characters.
2005-12-20:
-----------
* Add Protocol.do_one_event and Protocol.do_pending.
2002-05-03:
-----------
General Changes
* Merging CamlTk and LablTk API interfaces
* Activate and Deactivate Events are added
* Virtual events support
* Added UTF conversion
Incompatibilities between the previous camltk/labltk versions
* CamlTk's bind_tag and bind_class superseded tag_bind and class_bind.
* added optional arguments to some functions of CamlTk.
* The library name libfrx and libjpf are changed to frxlib and jpflib
respectively, to avoid the library name confusion.

View File

@ -0,0 +1,28 @@
This patch is required because of the following problem when linking
the test binary in ./configure. This seems unrelated to OCaml and
somehow caused by changes in Tcl (or Fedora) itself:
runtest: gcc -o tst -I/usr/local/include/tcl8.5 -I/usr/local/include/tk8.5 -I/usr/local/include tclversion.c -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -lm
tclversion.c:21:1: warning: return type defaults to 'int' [-Wimplicit-int]
21 | main ()
| ^~~~
/usr/bin/ld: /tmp/ccDzgQio.o: relocation R_RISCV_HI20 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: .gnu.build.attributes has both ordered [`.gnu.build.attributes.lo.exit' in /lib64/lp64d/../lib64/lp64d/Scrt1.o] and unordered [`.gnu.build.attributes' in /lib64/lp64d/../lib64/lp64d/Scrt1.o] sections
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
RWMJ 2022-09-20
--- labltk-8.06.12.old/config/auto-aux/runtest 2022-09-20 14:32:40.445384080 +0100
+++ labltk-8.06.12/config/auto-aux/runtest 2022-09-20 14:37:08.035133820 +0100
@@ -15,8 +15,8 @@
if test "$verbose" = yes; then
echo "runtest: $cc -o tst $* $cclibs" >&2
-$cc -o tst $* $cclibs || exit 100
+$cc -fPIC -o tst $* $cclibs || exit 100
else
-$cc -o tst $* $cclibs 2> /dev/null || exit 100
+$cc -fPIC -o tst $* $cclibs 2> /dev/null || exit 100
fi
exec ./tst

View File

@ -0,0 +1,43 @@
diff -ur labltk-8.06.13.old/support/Makefile labltk-8.06.13/support/Makefile
--- labltk-8.06.13.old/support/Makefile 2021-10-04 19:10:57.000196523 +0100
+++ labltk-8.06.13/support/Makefile 2021-10-04 19:18:06.263137991 +0100
@@ -28,7 +28,7 @@
cltkFile.$(O) cltkMain.$(O) cltkMisc.$(O) cltkTimer.$(O) \
cltkVar.$(O) cltkWait.$(O) cltkImg.$(O)
-CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS)
+CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g
COMPFLAGS=-I +unix
THFLAGS=-I +threads -I vmthreads
diff -ur labltk-8.06.13.old/support/Makefile.common labltk-8.06.11/support/Makefile.common
--- labltk-8.06.13.old/support/Makefile.common 2021-10-04 19:10:56.990196618 +0100
+++ labltk-8.06.13/support/Makefile.common 2021-10-04 19:18:06.264137981 +0100
@@ -21,19 +21,19 @@
## Tools from the OCaml distribution
CAMLRUN=$(BINDIR)/ocamlrun
-CAMLC=$(BINDIR)/ocamlc$(OPT)
-CAMLOPT=$(BINDIR)/ocamlopt$(OPT) $(WARNERR)
-CAMLCB=$(BINDIR)/ocamlc
-CAMLOPTB=$(BINDIR)/ocamlopt
-CAMLCOMP=$(CAMLC) -c $(WARNERR)
+CAMLC=$(BINDIR)/ocamlc$(OPT) -g
+CAMLOPT=$(BINDIR)/ocamlopt$(OPT) $(WARNERR) -g
+CAMLCB=$(BINDIR)/ocamlc -g
+CAMLOPTB=$(BINDIR)/ocamlopt -g
+CAMLCOMP=$(CAMLC) -c $(WARNERR) -g
CAMLYACC=$(BINDIR)/ocamlyacc -v
CAMLLEX=$(BINDIR)/ocamllex
-CAMLLIBR=$(CAMLC) -a
+CAMLLIBR=$(CAMLC) -a -g
CAMLDEP=$(BINDIR)/ocamldep
COMPFLAGS=-g
LINKFLAGS=
-CAMLOPTLIBR=$(CAMLOPT) -a
-MKLIB=$(BINDIR)/ocamlmklib
+CAMLOPTLIBR=$(CAMLOPT) -a -g
+MKLIB=$(BINDIR)/ocamlmklib -g
CAMLRUNGEN=$(BINDIR)/ocamlrun
ifeq (x$(RANLIB),x)
RANLIB=":"

BIN
labltk-8.06.13.tar.gz Normal file

Binary file not shown.

103
labltk.spec Normal file
View File

@ -0,0 +1,103 @@
%ifarch %{ocaml_native_compiler}
%global native_compiler 1
%else
%global native_compiler 0
%endif
Name: ocaml-labltk
Version: 8.06.13
Release: 1
Summary: Tcl/Tk interface for OCaml
License: LGPLv2+ with exceptions
URL: https://github.com/garrigue/labltk
Source0: https://github.com/garrigue/labltk/archive/%{version}/labltk-%{version}.tar.gz
# This adds debugging (-g) everywhere.
Patch1: labltk-8.06.13-enable-debugging.patch
Patch2: add_sp.patch
Patch3: labltk-8.06.12-use-fpic-configure.patch
BuildRequires: ocaml tcl-devel tk-devel make
%description
labltk or mlTk is a library for interfacing OCaml with the scripting
language Tcl/Tk (all versions since 8.0.3, but no betas).
%package devel
Summary: Tcl/Tk interface for OCaml
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
labltk or mlTk is a library for interfacing OCaml with the scripting
language Tcl/Tk (all versions since 8.0.3, but no betas).
This package contains the development files.
%prep
%setup -q -n labltk-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
find -name .gitignore -delete
find -type f | xargs sed -i -e 's/-warn-error/-w/g'
# Don't build ocamlbrowser.
mv browser browser.old
mkdir browser
echo -e 'all:\ninstall:\n' > browser/Makefile
%build
./configure -verbose
unset MAKEFLAGS
%if !%{native_compiler}
make byte
%else
make all opt \
SHAREDCCCOMPOPTS="%{optflags} -fPIC" \
TK_LINK="%{__global_ldflags} -ltk8.6 -ltcl8.6"
%endif
%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
make install \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/labltk \
STUBLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
RANLIB=:
%if %{native_compiler}
install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
%endif
%files
%doc Changes README.mlTk
%dir %{_libdir}/ocaml/labltk
%{_libdir}/ocaml/labltk/*.cmi
%{_libdir}/ocaml/labltk/*.cma
%{_libdir}/ocaml/labltk/*.cmo
%{_libdir}/ocaml/stublibs/dlllabltk.so
%files devel
%doc README.mlTk
%doc examples_camltk
%doc examples_labltk
%{_bindir}/labltk
%{_libdir}/ocaml/labltk/labltktop
%{_libdir}/ocaml/labltk/pp
%{_libdir}/ocaml/labltk/tkcompiler
%{_libdir}/ocaml/labltk/*.a
%if %{native_compiler}
%{_libdir}/ocaml/labltk/*.cmxa
%{_libdir}/ocaml/labltk/*.cmx
%{_libdir}/ocaml/labltk/*.o
%endif
%{_libdir}/ocaml/labltk/*.mli
%changelog
* Mon May 15 2023 liyanan <thistleslyn@163.com> - 8.06.13-1
- update version to 8.06.13
* Fri Apr 15 2022 wangkai <wangkai385@h-partners.com> -8.06.11-1
- update to 8.06.11
* Thu Sep 9 2021 gongzhengtang <gongzhengtang@huawei.com> - 8.06.4-2
- fix sp
* Fri Oct 9 2020 maminjie <maminjie1@huawei.com> - 8.06.4-1
- package init

4
labltk.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: garrigue/labltk
tag_prefix: "^"
seperator: "."