aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÄlven <alster@vinterdalen.se>2025-01-29 10:54:02 +0000
committerFernando Apesteguía <fernape@FreeBSD.org>2025-02-03 17:54:56 +0000
commit5272a12b31b467fc6655ba4e20d5b8b55064927c (patch)
treeee4dabdbb831b52250617525b2d4b2db956da56d
parent05cb8386d2c1a0ea4dee65593a15522f3677fdca (diff)
devel/libCello: update 1.1.7 → 2.1.0, improve port
ChangeLog: https://libcello.org/learn/best-improvements-of-cello-2.0 PR: 284068 Reported by: alster@vinterdalen.se Approved by: matthew.closson@gmail.com (maintainer, timeout > 2 weeks)
-rw-r--r--devel/libCello/Makefile29
-rw-r--r--devel/libCello/distinfo5
-rw-r--r--devel/libCello/files/patch-Makefile36
-rw-r--r--devel/libCello/pkg-descr21
-rw-r--r--devel/libCello/pkg-plist35
5 files changed, 66 insertions, 60 deletions
diff --git a/devel/libCello/Makefile b/devel/libCello/Makefile
index 851e3b8d3b35..3c0b99bcd533 100644
--- a/devel/libCello/Makefile
+++ b/devel/libCello/Makefile
@@ -1,20 +1,33 @@
PORTNAME= libCello
-PORTVERSION= 1.1.7
-PORTREVISION= 1
+DISTVERSION= 2.1.0
CATEGORIES= devel
-MASTER_SITES= http://libcello.org/static/
+MASTER_SITES= https://libcello.org/static/
MAINTAINER= matthew.closson@gmail.com
COMMENT= Higher level programming in C
-WWW= https://libcello.org
+WWW= https://libcello.org/ \
+ https://github.com/orangeduck/Cello/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.md
-USES= dos2unix gmake
-DOS2UNIX_FILES= Makefile
+USES= gmake
+USE_LDCONFIG= yes
-post-patch:
- ${REINPLACE_CMD} -E 's| abs\(| labs\(|' ${WRKSRC}/src/*.c
+MAKE_ENV= DESTDIR=${STAGEDIR}
+TEST_TARGET= check
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}.so
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.mk>
diff --git a/devel/libCello/distinfo b/devel/libCello/distinfo
index f46b605f73b9..f033c5f77b9f 100644
--- a/devel/libCello/distinfo
+++ b/devel/libCello/distinfo
@@ -1,2 +1,3 @@
-SHA256 (libCello-1.1.7.tar.gz) = 2273fe8257109c2dd19054beecd83ddcc780ec565a1ad02721e24efa74082908
-SIZE (libCello-1.1.7.tar.gz) = 52793
+TIMESTAMP = 1736881696
+SHA256 (libCello-2.1.0.tar.gz) = 49acf6525ac6808c49f2125ecdc101626801cffe87da16736afb80684b172b28
+SIZE (libCello-2.1.0.tar.gz) = 73492
diff --git a/devel/libCello/files/patch-Makefile b/devel/libCello/files/patch-Makefile
index d14b3eb49222..563f3d5df783 100644
--- a/devel/libCello/files/patch-Makefile
+++ b/devel/libCello/files/patch-Makefile
@@ -1,24 +1,24 @@
---- Makefile.orig 2015-06-25 22:20:28 UTC
+--- Makefile.orig 2017-01-27 09:37:38 UTC
+++ Makefile
-@@ -18,8 +18,8 @@ DEMOS := $(wildcard demos/*.c)
- DEMOS_OBJ := $(addprefix obj/,$(notdir $(DEMOS:.c=.o)))
- DEMOS_EXE := $(DEMOS:.c=)
+@@ -18,7 +18,7 @@ EXAMPLES_EXE := $(EXAMPLES:.c=)
+ EXAMPLES_OBJ := $(addprefix obj/,$(notdir $(EXAMPLES:.c=.o)))
+ EXAMPLES_EXE := $(EXAMPLES:.c=)
--CFLAGS = -I ./include -std=gnu99 -Wall -Werror -Wno-unused -O3 -g
--LFLAGS = -shared -g -ggdb
-+CFLAGS += -I ./include -std=gnu99 -Wall -Werror -Wno-unused
-+LFLAGS = ${LDFLAGS} -shared
+-CFLAGS = -I ./include -std=gnu99 -Wall -Wno-unused -g -ggdb
++CFLAGS += -I ./include -std=gnu99 -Wall -Wno-unused -g -ggdb
PLATFORM := $(shell uname)
COMPILER := $(shell $(CC) -v 2>&1 )
-@@ -42,8 +42,8 @@ else
-
- CFLAGS += -fPIC
-
+@@ -85,9 +85,9 @@ else ifeq ($(findstring FreeBSD,$(PLATFORM)),FreeBSD)
+ CFLAGS += -DCELLO_NSTRACE
+ endif
+
- INSTALL_LIB = mkdir -p ${LIBDIR} && cp -f ${STATIC} ${LIBDIR}/$(STATIC)
-- INSTALL_INC = mkdir -p ${INCDIR} && cp -r include/* ${INCDIR}
-+ INSTALL_LIB = mkdir -p ${DESTDIR}${LIBDIR} && cp -f ${STATIC} ${DESTDIR}${LIBDIR}/$(STATIC)
-+ INSTALL_INC = mkdir -p ${DESTDIR}${INCDIR} && cp -r include/* ${DESTDIR}${INCDIR}
- endif
-
- ifeq ($(findstring clang,$(COMPILER)),clang)
+- INSTALL_INC = mkdir -p ${INCDIR} && cp -r include/Cello.h ${INCDIR}
+- UNINSTALL_LIB = rm -f ${LIBDIR}/$(STATIC)
++ INSTALL_LIB = mkdir -p ${DESTDIR}${LIBDIR} && cp -f ${DYNAMIC} ${STATIC} ${DESTDIR}${LIBDIR}
++ INSTALL_INC = mkdir -p ${DESTDIR}${INCDIR} && cp -r include/Cello.h ${DESTDIR}${INCDIR}
++ UNINSTALL_LIB = rm -f ${DESTDIR}${LIBDIR}/{$(DYNAMIC),$(STATIC)}
+ UNINSTALL_INC = rm -f ${INCDIR}/Cello.h
+ else
+ PREFIX ?= /usr/local
diff --git a/devel/libCello/pkg-descr b/devel/libCello/pkg-descr
index 77b4824ad2d5..b2768e3e6b25 100644
--- a/devel/libCello/pkg-descr
+++ b/devel/libCello/pkg-descr
@@ -1,8 +1,15 @@
-Cello is a library that introduces higher level programming to C.
+Cello is a library that brings higher level programming to C.
-Interfaces allow for structured design
-Duck Typing allows for generic functions
-Exceptions control error handling
-Constructors/Destructors aid memory management
-Syntactic Sugar increases readability
-C Library means excellent performance and integration
+By acting as a modern, powerful runtime system Cello makes many things easy that
+were previously impractical or awkward in C such as:
+
+- Generic Data Structures
+- Polymorphic Functions
+- Interfaces / Type Classes
+- Constructors / Destructors
+- Optional Garbage Collection
+- Exceptions
+- Reflection
+
+And because Cello works seamlessly alongside standard C you get all the other
+benefits such as great performance, powerful tooling, and extensive libraries.
diff --git a/devel/libCello/pkg-plist b/devel/libCello/pkg-plist
index f8369efab7e9..ebc43005c497 100644
--- a/devel/libCello/pkg-plist
+++ b/devel/libCello/pkg-plist
@@ -1,27 +1,12 @@
-include/Cello/FunctionAuto.h
-include/Cello/Lambda.h
-include/Cello/Dictionary.h
-include/Cello/Map.h
-include/Cello/Reference.h
-include/Cello/LambdaCurry.h
-include/Cello/Table.h
-include/Cello/Format.h
-include/Cello/String.h
-include/Cello/Value.h
-include/Cello/Array.h
-include/Cello/Function.h
-include/Cello/Pool.h
-include/Cello/Tree.h
-include/Cello/Type.h
-include/Cello/List.h
-include/Cello/None.h
-include/Cello/Module.h
-include/Cello/Exception.h
-include/Cello/File.h
-include/Cello/Prelude.h
-include/Cello/Thread.h
-include/Cello/Char.h
-include/Cello/Bool.h
-include/Cello/Number.h
include/Cello.h
lib/libCello.a
+lib/libCello.so
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cello_world.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/help.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/iteration.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/newtype.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/object.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ranges.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/table.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/threads.c