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

Upgrade: libdrm upgrade from externel/libdrm #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
43 changes: 42 additions & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,35 @@
// IN THE SOFTWARE.
//

package {
default_applicable_licenses: ["external_libdrm_license"],
}

// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "external_libdrm_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-MIT",
"legacy_unencumbered",
],
// large-scale-change unable to identify any license_text files
}

subdirs = ["*"]
build = ["Android.sources.bp"]

Expand All @@ -44,7 +73,15 @@ cc_defaults {
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
export_include_dirs: ["."],
export_system_include_dirs: ["."],
}

cc_library_headers {
name: "libdrm_headers",
vendor_available: true,
host_supported: true,
defaults: ["libdrm_defaults"],
export_include_dirs: ["include/drm", "android"],
}

// Library for the device
Expand All @@ -66,4 +103,8 @@ cc_library {
"-Wno-sign-compare",
"-Wno-tautological-compare",
],
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
40 changes: 40 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
libdrm is under MIT license.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------------------------------------------
intel/uthash.h

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
176 changes: 0 additions & 176 deletions Makefile.am

This file was deleted.

30 changes: 1 addition & 29 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ the Mesa drivers, the X drivers, libva and similar projects.
Compiling
---------

libdrm has two build systems, a legacy autotools build system, and a newer
meson build system. The meson build system is much faster, and offers a
slightly different interface, but otherwise provides an equivalent feature set.

To use it:
To set up meson:

meson builddir/

Expand All @@ -35,27 +31,3 @@ Then use ninja to build and install:

If you are installing into a system location you will need to run install
separately, and as root.


Alternatively you can invoke autotools configure:

./configure

By default, libdrm will install into the /usr/local/ prefix. If you
want to install this DRM to replace your system copy, pass
--prefix=/usr and --exec-prefix=/ to configure. If you are building
libdrm from a git checkout, you first need to run the autogen.sh
script. You can pass any options to autogen.sh that you would other
wise pass to configure, or you can just re-run configure with the
options you need once autogen.sh finishes.

Next step is to build libdrm:

make

and once make finishes successfully, install the package using

make install

If you are installing into a system location, you will need to be root
to perform the install step.
29 changes: 9 additions & 20 deletions RELEASING
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,22 @@ However, this is up to whoever is driving the feature in question.

Follow these steps to release a new version of libdrm:

1) Bump the version number in configure.ac and meson.build. We seem
to have settled for 2.4.x as the versioning scheme for libdrm, so
just bump the micro version.
1) Bump the version number in meson.build. We seem to have settled for
2.4.x as the versioning scheme for libdrm, so just bump the micro
version.

2) Run autoconf and then re-run ./configure so the build system
picks up the new version number.
2) Run `ninja -C builddir/ dist` to generate the tarballs.
Make sure that the version number of the tarball name in
builddir/meson-dist/ matches the number you bumped to. Move that
tarball to the libdrm repo root for the release script to pick up.

3) Verify that the code passes "make distcheck". Running "make
distcheck" should result in no warnings or errors and end with a
message of the form:

=============================================
libdrm-X.Y.Z archives ready for distribution:
libdrm-X.Y.Z.tar.gz
libdrm-X.Y.Z.tar.bz2
=============================================

Make sure that the version number reported by distcheck and in
the tarball names matches the number you bumped to in configure.ac.

4) Push the updated master branch with the bumped version number:
3) Push the updated master branch with the bumped version number:

git push origin master

assuming the remote for the upstream libdrm repo is called origin.

5) Use the release.sh script from the xorg/util/modular repo to
4) Use the release.sh script from the xorg/util/modular repo to
upload the tarballs to the freedesktop.org download area and
create an announce email template. The script takes one argument:
the path to the libdrm checkout. So, if a checkout of modular is
Expand Down
9 changes: 9 additions & 0 deletions amdgpu/Android.bp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "external_libdrm_license"
// to get the below license kinds:
// SPDX-license-identifier-MIT
default_applicable_licenses: ["external_libdrm_license"],
}

build = ["Android.sources.bp"]

cc_library_shared {
Expand Down
Loading