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

Added libstemmer as a package #27842

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

thewchan
Copy link
Contributor

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

Copy link

Hi! This is the staged-recipes linter and your PR looks excellent! 🚀

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/libstemmer/meta.yaml) and found it was in an excellent condition.

@xhochy
Copy link
Member

xhochy commented Oct 11, 2024

Ouch. I took a look at the Makefile and this is not a simple recipe to do your first C(++) package :(

@thewchan
Copy link
Contributor Author

@xhochy @conda-forge/help-c-cpp First time doing a C package, I think it's a simple one because the build is based on this makefile that's already include in the distro. However win build isn't working, I think because it doesn't recognize the ar command? There's probably some m2w64 version of this right?

@thewchan
Copy link
Contributor Author

@xhochy is this even working for linux and osx? I pretty much just ran the make file

@thewchan
Copy link
Contributor Author

@xhochy FWIW, here's the content of that makefile:

include mkinc.mak
ifeq ($(OS),Windows_NT)
EXEEXT=.exe
endif
CFLAGS=-O2
CPPFLAGS=-Iinclude
all: libstemmer.a stemwords$(EXEEXT)
libstemmer.a: $(snowball_sources:.c=.o)
	$(AR) -cru $@ $^
stemwords$(EXEEXT): examples/stemwords.o libstemmer.a
	$(CC) $(CFLAGS) -o $@ $^
clean:
	rm -f stemwords$(EXEEXT) libstemmer.a *.o src_c/*.o examples/*.o runtime/*.o libstemmer/*.o

@xhochy
Copy link
Member

xhochy commented Oct 11, 2024

This makefile isn't installing anything. To make this work, you basically need to rewrite it from scratch.

@thewchan
Copy link
Contributor Author

I guess the makefile is just compiling it and putting them into an archive...

@thewchan
Copy link
Contributor Author

I'm checking this out and trying to get up to speed... https://conda.org/blog/2023-05-18-how-to-use-conda-build/

@thewchan
Copy link
Contributor Author

it looks like the makefile did successfully compiled everything and put it into a .a file, right? I can maybe reference the makefile and modify it into something that's compiling it into a shared library?

@xhochy
Copy link
Member

xhochy commented Oct 11, 2024

I'm checking this out and trying to get up to speed... https://conda.org/blog/2023-05-18-how-to-use-conda-build/

Eventhough it looks official, it is not the best reference (e.g. please don't use the GCC package).

@thewchan
Copy link
Contributor Author

thewchan commented Oct 11, 2024

@xhochy yeah I caught that will stick with jinja variable for compiler. I'm just not familiar with C myself to know how to make this build a shared library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants