From owner-freebsd-ports@freebsd.org Fri Jan 15 20:17:49 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EF544F1913 for ; Fri, 15 Jan 2021 20:17:49 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHXY84MhXz3lVw for ; Fri, 15 Jan 2021 20:17:47 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-ed1-x52a.google.com with SMTP id g1so10267871edu.4 for ; Fri, 15 Jan 2021 12:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ujdE+prLzoPC1ejPqUU8x8PXn8TNypFUmTiz+/HM8Sk=; b=ek/UJim5dSmTviYULhoEsUL6HUa67979J4/crVr7g6nWa6k1DwKy3Pjn8uhS/ioB30 oqKCsUMqFWftTI+sfmIl3RrGdBdA0wCWE9f1KXAGs65+YSvd/v89iImV+id0NspNkARh yYbPm+8ILzPJnbR2yuymAqVUZuilxJ2GMiUMApYLhkVvzaYCbOSxyAd3l5aOtNN6Y9QO FAsD2KAVcqBF2/ezBvzCLNh4gDRLAGbnmGI1OzJfxeuiB4uqYF/Ydspei4I+DS2lKa+z oVj63Y1Qr1glr1hv6Z0uP7m27ygrOQCUM5+M7ouovg+vfGwlU0nGBaKxfelqcFjB2myl n/Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ujdE+prLzoPC1ejPqUU8x8PXn8TNypFUmTiz+/HM8Sk=; b=phmVU5x+e8ZWRCuyK1CXg0j/Zf4QKyYw1CsZFWKbkHKbWl7Hpx6pFfYFZJHtk9+39w of/U5nLnvvoFn7RVsIOEyjGt+u5NVSwbRIm0oJhi2Xl8zp136zvWWrMds8UkAawZ56r9 qy+Xn5M3MeodLgqL7ti9bP8Imj2tGtVYoMw6cMouy+cHHPMl1gkxX0NU7gIyDPmmKkX2 uuHVqbSXvrs9ZWVltQd9G3CWiARVWrM5F97M4M1C6Ao783BhZN8NDAxqIkzHwRHumjoM MwGC1Il8Tagzitbc/B+iGKQPVc+k3fMvdcgUz4wXyx9SxYxTRMoelMzKNVdwvsG0XJXC oZVQ== X-Gm-Message-State: AOAM530TDYK0YwPsep2d9vnmDQkvgwd0LyILF47Fx2JtAJibtl/UqYuJ oLiJkHJtkyZvqFX7W0cCJYfwRJv6Q8l6dztHnQgZ6+qPqBpNmA== X-Google-Smtp-Source: ABdhPJxYg8KT+iQaOXVbKDBA9Na7XMNMyK49Ma0XxUbYdtJpiJyMXA0szzv1np9XG08rT8kOQV7/jW+NBje02XSEcWI= X-Received: by 2002:a05:6402:1caa:: with SMTP id cz10mr11173541edb.345.1610741866720; Fri, 15 Jan 2021 12:17:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Tomasz CEDRO Date: Fri, 15 Jan 2021 21:17:36 +0100 Message-ID: Subject: Re: CMAKE_PREFIX_PATH and /usr/local To: Gleb Popov Cc: freebsd-ports Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DHXY84MhXz3lVw X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=ek/UJim5; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2a00:1450:4864:20::52a) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; DMARC_NA(0.00)[cedro.info]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::52a:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::52a:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-ports] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 20:17:49 -0000 On Fri, Jan 15, 2021 at 10:05 AM Gleb Popov wrote: > On Fri, Jan 15, 2021 at 12:50 AM Tomasz CEDRO wrote: >> Hello world :-) >> I am porting LimeSuite to FreeBSD. Local patch fixes missing >> "/usr/local/" path in CMakeLists.txt so the package now builds fine on >> FreeBSD. On Linux probably most of the libraries and includes are >> located in /usr/ do problem does not exist. >> Upstream has some objections to accept this patch and considers >> "/usr/local" a non-standard path [1]. But they propose to use >> CMAKE_PREFIX_PATH to add "/usr/local". This however does not seem to >> be supported in Ports (yet?). >> The question is how to tell CMake about "/usr/local/include" without >> source code modification? :-) >> Below is the proposed patch: >> > @@ -171,6 +171,11 @@ if (ENABLE_NEW_GAIN_BEHAVIOUR) >> add_definitions(-DNEW_GAIN_BEHAVIOUR) >> endif() >> +if (CMAKE_SYSTEM_NAME MATCHES "BSD") >> + include_directories("/usr/local/include") > > This is most certainly a wrong thing to do. Instead of simply adding -I/usr/local/include everywhere, you should fix problems for each dependency that the software requires. > > What error do you get without your patch? Hello Gleb :-) This seems the LimeSuite CMake issue not to use /usr/local/include where some GL includes are located. Without it there is a build problem as GL.h (something like this) is not found. I am not sure it this is the only occurrence of this symptom. Simply adding /usr/local/include solves the problem. Accorging to cmake 3.19 documentation CMAKE_PREFIX_PATH is empty by default and it needs to be filled with search paths by the project: CMAKE_PREFIX_PATH is empty by default, so the project sets the value, so the /usr/local is missing now and should be put here (but still in the source code so the patch seems unavoidable): https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html?highlight=cmake_prefix_path We are back in the point either to fix the upstream and add "/usr/local" into CMAKE_PREFIX_PATH or propagate is somehow from a port anyhow..? Thanks :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info