Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcaca: remove need for compiler blacklist #12828

Merged
merged 1 commit into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions graphics/libcaca/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

PortSystem 1.0
PortGroup github 1.0
PortGroup compiler_blacklist_versions 1.0

name libcaca
categories graphics
Expand Down Expand Up @@ -55,26 +54,13 @@ depends_build port:pkgconfig
depends_lib port:ncurses port:zlib

# temporary patch to fix use of implcitily declared function

patchfiles-append patch-fix-implicit-function.diff
patch.pre_args -p1
patchfiles-append patch-libcaca-common-image.diff

use_autoconf yes
# these dependencies are removed by use_autoconf, so add them after
depends_build-append port:libtool port:autoconf port:automake
autoconf.cmd ./bootstrap

# Fix link errors on 10.8 and 10.9:
# Undefined symbols for architecture x86_64:
# "__caca_alloc2d", referenced from:
# _load_image in img2txt-common-image.o
# Undefined symbols for architecture x86_64:
# "__caca_alloc2d", referenced from:
# _load_image in cacaview-common-image.o
# ld: symbol(s) not found for architecture x86_64
compiler.blacklist-append \
{clang < 900}

# require C++11 for CppUnit API
compiler.cxx_standard 2011
configure.cxxflags-append -std=gnu++11
Expand Down
13 changes: 0 additions & 13 deletions graphics/libcaca/files/patch-fix-implicit-function.diff

This file was deleted.

14 changes: 14 additions & 0 deletions graphics/libcaca/files/patch-libcaca-common-image.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
_caca_alloc2d is an internal function and not exported to
the image viewer. It is basically a glorified call to malloc.

--- src/common-image.c.orig 2021-11-06 10:15:28.000000000 -0400
+++ src/common-image.c 2021-11-06 10:15:59.000000000 -0400
@@ -161,7 +161,7 @@
uint32_t depth = (bpp + 7) / 8;

/* Allocate the pixel buffer */
- im->pixels = _caca_alloc2d(im->w, im->h, depth);
+ im->pixels = malloc(im->w * im->h * depth);
if (!im->pixels)
{
caca_file_close(f);