From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1A067158089 for ; Mon, 6 Nov 2023 14:18:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BD0A2BC0B4; Mon, 6 Nov 2023 14:18:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 570E62BC0B4 for ; Mon, 6 Nov 2023 14:18:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5FA4E335D1E for ; Mon, 6 Nov 2023 14:18:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A9A52133A for ; Mon, 6 Nov 2023 14:18:44 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1699242948.e2e38fbb37db53ef56f599a71da51a5c8880aebc.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: sys-devel/lcc/files/, sys-devel/lcc/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sys-devel/lcc/Manifest sys-devel/lcc/files/add_cmake_support.patch sys-devel/lcc/lcc-2021.01.11.ebuild X-VCS-Directories: sys-devel/lcc/files/ sys-devel/lcc/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: e2e38fbb37db53ef56f599a71da51a5c8880aebc X-VCS-Branch: master Date: Mon, 6 Nov 2023 14:18:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 57dcdbaf-f468-4af6-8da6-44e1902d318f X-Archives-Hash: ad46e708eb44a6c87548e281bc210cd8 commit: e2e38fbb37db53ef56f599a71da51a5c8880aebc Author: Benoît Dufour mail com> AuthorDate: Mon Nov 6 03:55:48 2023 +0000 Commit: David Roman gmail com> CommitDate: Mon Nov 6 03:55:48 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e2e38fbb sys-devel/lcc: new package, add 2021.01.11 Signed-off-by: Benoît Dufour mail.com> sys-devel/lcc/Manifest | 1 + sys-devel/lcc/files/add_cmake_support.patch | 156 ++++++++++++++++++++++++++++ sys-devel/lcc/lcc-2021.01.11.ebuild | 36 +++++++ 3 files changed, 193 insertions(+) diff --git a/sys-devel/lcc/Manifest b/sys-devel/lcc/Manifest new file mode 100644 index 0000000000..ed6f4dca88 --- /dev/null +++ b/sys-devel/lcc/Manifest @@ -0,0 +1 @@ +DIST 3fd0acc0c3087411c0966d725a56be29038c05a9.tar.gz 636724 BLAKE2B 9fffbda4e888d79c672d2da25cec4132848ce5f8cadd99f128645389377230b491ef3d2f3c550774df6ae82fd6304addcd1f00d6d0da79440ea510b0d97d5600 SHA512 f954509307136632408a219ccefa3e85a05538553c17aec72556979370fa795076a574033c6f7d2b51ca30218665fddd3b576b00fdb6327ae09f0e0c041d428a diff --git a/sys-devel/lcc/files/add_cmake_support.patch b/sys-devel/lcc/files/add_cmake_support.patch new file mode 100644 index 0000000000..5fc4622127 --- /dev/null +++ b/sys-devel/lcc/files/add_cmake_support.patch @@ -0,0 +1,156 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..6c3b77c +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,11 @@ ++cmake_minimum_required(VERSION 3.13) ++ ++# TODO: test, triple ++ ++project(lcc C) ++ ++add_subdirectory(lburg) ++add_subdirectory(src) ++add_subdirectory(cpp) ++add_subdirectory(etc) ++add_subdirectory(lib) +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +new file mode 100644 +index 0000000..accff2e +--- /dev/null ++++ b/cpp/CMakeLists.txt +@@ -0,0 +1,12 @@ ++add_executable(cpp ++ cpp.c ++ lex.c ++ nlist.c ++ tokens.c ++ macro.c ++ eval.c ++ include.c ++ hideset.c ++ getopt.c ++ unix.c ++ ) +\ No newline at end of file +diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt +new file mode 100644 +index 0000000..aa4d4aa +--- /dev/null ++++ b/etc/CMakeLists.txt +@@ -0,0 +1,18 @@ ++add_executable(lcc ++ lcc.c) ++ ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ target_sources(lcc PRIVATE win32.c) ++elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") ++ target_sources(lcc PRIVATE linux.c) ++endif() ++ ++add_executable(bprint ++ bprint.c) ++ ++target_link_libraries(bprint PRIVATE profio) ++ ++add_executable(ops EXCLUDE_FROM_ALL ++ ops.c) ++ ++target_link_libraries(ops PRIVATE c) +\ No newline at end of file +diff --git a/lburg/CMakeLists.txt b/lburg/CMakeLists.txt +new file mode 100644 +index 0000000..25b0ae1 +--- /dev/null ++++ b/lburg/CMakeLists.txt +@@ -0,0 +1,14 @@ ++ ++add_executable(lburg ++ lburg.c ++ gram.c) ++ ++target_include_directories(lburg PRIVATE lburg) ++ ++# lburg function for generation of c files from md files ++function(lburg md_file c_file) ++ add_custom_command(OUTPUT ${c_file} ++ DEPENDS ${md_file} ++ COMMAND lburg ${md_file} ${c_file} ++ VERBATIM) ++endfunction() +\ No newline at end of file +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +new file mode 100644 +index 0000000..3c31289 +--- /dev/null ++++ b/lib/CMakeLists.txt +@@ -0,0 +1,4 @@ ++add_library(liblcc STATIC ++ assert.c ++ yynull.c ++ bbexit.c) +\ No newline at end of file +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +new file mode 100644 +index 0000000..21efef9 +--- /dev/null ++++ b/src/CMakeLists.txt +@@ -0,0 +1,56 @@ ++add_executable(rcc ++ main.c) ++ ++target_link_libraries(rcc PRIVATE librcc) ++ ++lburg(${CMAKE_CURRENT_SOURCE_DIR}/dagcheck.md dagcheck.c) ++lburg(${CMAKE_CURRENT_SOURCE_DIR}/alpha.md alpha.c ) ++lburg(${CMAKE_CURRENT_SOURCE_DIR}/mips.md mips.c ) ++lburg(${CMAKE_CURRENT_SOURCE_DIR}/sparc.md sparc.c ) ++lburg(${CMAKE_CURRENT_SOURCE_DIR}/x86.md x86.c ) ++lburg(${CMAKE_CURRENT_SOURCE_DIR}/x86linux.md x86linux.c) ++ ++add_library(librcc STATIC ++ alloc.c ++ bind.c ++ dag.c ++ dagcheck.c ++ decl.c ++ enode.c ++ error.c ++ expr.c ++ event.c ++ init.c ++ inits.c ++ input.c ++ lex.c ++ list.c ++ main.c ++ output.c ++ prof.c ++ profio.c ++ simp.c ++ stmt.c ++ string.c ++ sym.c ++ trace.c ++ tree.c ++ types.c ++ null.c ++ symbolic.c ++ gen.c ++ bytecode.c ++ alpha.c ++ mips.c ++ sparc.c ++ stab.c ++ x86.c ++ x86linux.c) ++ ++target_include_directories(librcc PUBLIC .) ++ ++add_library(c INTERFACE) ++target_include_directories(c INTERFACE .) ++ ++add_library(profio INTERFACE) ++target_include_directories(profio INTERFACE .) +\ No newline at end of file diff --git a/sys-devel/lcc/lcc-2021.01.11.ebuild b/sys-devel/lcc/lcc-2021.01.11.ebuild new file mode 100644 index 0000000000..cd525f9814 --- /dev/null +++ b/sys-devel/lcc/lcc-2021.01.11.ebuild @@ -0,0 +1,36 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +# Would allow installing gentoo on any arch. +DESCRIPTION="The lcc retargetable ANSI C compiler" +HOMEPAGE="https://drh.github.io/lcc/" +SHA='3fd0acc0c3087411c0966d725a56be29038c05a9' +SRC_URI="https://github.com/drh/lcc/archive/${SHA}.tar.gz" + +# Build using CMake, still missing some features. +PATCHES=( "${FILESDIR}/add_cmake_support.patch" ) + +LICENSE="lcc" +SLOT="0" +KEYWORDS="~amd64" + +# What are the dependencies if any? +#DEPEND="" +#RDEPEND="${DEPEND}" +#BDEPEND="" +S="${WORKDIR}/${PN}-${SHA}" + +src_install() { + doman "doc/bprint.1" + doman "doc/lcc.1" + #into "/usr/lib/lcc" + dobin "${WORKDIR}/${PN}-${SHA}_build/cpp/cpp" + dobin "${WORKDIR}/${PN}-${SHA}_build/etc/bprint" + dobin "${WORKDIR}/${PN}-${SHA}_build/etc/lcc" + dobin "${WORKDIR}/${PN}-${SHA}_build/lburg/lburg" + dobin "${WORKDIR}/${PN}-${SHA}_build/src/rcc" +}