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

PDCurses #52

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
23 changes: 23 additions & 0 deletions PDCurses/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Port Metadata
PORTNAME = libpdcurses
PORTVERSION = 1.0.0

MAINTAINER = Donald Haase
LICENSE = Public Domain
SHORT_DESC = PDCurses is a public domain curses library

# Requires SDL1 for now
DEPENDENCIES = SDL

# What files we need to download, and where from.
GIT_REPOSITORY = https://github.com/wmcbrine/PDCurses.git

TARGET = libpdcurses.a
INSTALLED_HDRS = curses.h
HDR_INSTDIR = PDCurses
EXAMPLES_DIR = demos

# KOS Distributed extras (to be copied into the build tree)
KOS_DISTFILES = KOSMakefile.mk

include ${KOS_PORTS}/scripts/kos-ports.mk
48 changes: 48 additions & 0 deletions PDCurses/files/KOSMakefile.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Makefile for PDCurses for SDL on KOS

PDCURSES_SRCDIR = .

O = o

include $(PDCURSES_SRCDIR)/common/libobjs.mif

osdir = $(PDCURSES_SRCDIR)/sdl1

PDCURSES_SDL_H = $(osdir)/pdcsdl.h

ifeq ($(DEBUG),Y)
CFLAGS = $(KOS_CFLAGS) -DPDCDEBUG
else
CFLAGS = $(KOS_CFLAGS)
endif

ifeq ($(UTF8),Y)
CFLAGS += -DPDC_FORCE_UTF8
endif

BUILD = kos-cc $(CFLAGS) -I$(KOS_PORTS)/include/SDL -I$(PDCURSES_SRCDIR)

LDFLAGS = $(LIBCURSES) -lSDL
RANLIB = ranlib
LIBCURSES = libpdcurses.a

.PHONY: all clean

all: $(LIBCURSES)

clean:
-rm -rf *.o $(LIBCURSES)

$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
ar rv $@ $?
-$(RANLIB) $@

$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_SDL_H)

$(LIBOBJS) : %.o: $(srcdir)/%.c
$(BUILD) -c $<

$(PDCOBJS) : %.o: $(osdir)/%.c
$(BUILD) -c $<

7 changes: 7 additions & 0 deletions PDCurses/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PDCurses is a public domain curses library for DOS, OS/2, Windows console,
X11 and SDL, implementing most of the functions available in X/Open and
System V R4 curses, and supporting a variety of compilers for these platforms.
The X11 and SDL ports let you recompile existing text-mode curses programs to
produce GUI applications.

URL: https://pdcurses.org/